- Part 3
suhailkaleem

suhailkaleem

(0 comments, 35 posts)

This user hasn't shared any profile information

Home page: https://suhailkaleem.com

Posts by suhailkaleem

jquery .click does not work

0

If you are adding a html dynamically  and then binding the .click event of an element  then this will not work

the .click event will never bind

in order to make the events works for the dynamic html or elements  use .live like below

$('#ElementID').live('click', function (event) {
if (event.button != 0) {
// left button - ignore it
return true;

} else {
//right button
var id = $(this).attr('id'); // do something

return false; // "capture" the click
}
});

Also you might have noticed that i have a check to see which button was clicked , because in  .live method left and right mouse buttons both  bind to click event unlike the .click event only right button is bind so we have to check in .live which button was clicked

Function to format dateTime to RSS 2 pubDate

0

The following vb.net function will format the date-time  to pubDate format for rss 2

Private Function BuildPubDate(ByVal d As Date) As String
Try
Dim RV As String
Dim day As String = d.Day.ToString
If day.Length = 1 Then day = "0" & day
Dim month As String = d.Month.ToString
Select Case month
Case "1"
month = "January"
Case "2"
month = "February"
Case "3"
month = "March"
Case "4"
month = "April"
Case "5"
month = "May"
Case "6"
month = "June"
Case "7"
month = "July"
Case "8"
month = "August"
Case "9"
month = "September"
Case "10"
month = "October"
Case "11"
month = "November"
Case "12"
month = "December"
End Select

Dim Mtime As String = ""
Dim mDate As Date = d.ToUniversalTime
If mDate.Hour.ToString.Length = 1 Then
Mtime = "0" & mDate.Hour.ToString
Else
Mtime = mDate.Hour.ToString
End If
Mtime += ":"
If mDate.Minute.ToString.Length = 1 Then
Mtime += "0" & mDate.Minute.ToString
Else
Mtime += mDate.Minute.ToString
End If
Mtime += ":"
If mDate.Second.ToString.Length = 1 Then
Mtime += "0" & mDate.Second.ToString
Else
Mtime += mDate.Second.ToString
End If

RV = d.DayOfWeek.ToString.Substring(0, 3)
RV += ", " & day & " " & month.Substring(0, 3)
RV += " " & d.Year.ToString & " " & Mtime & " GMT"
Return RV
Catch ex As Exception
Return ""
End Try

Form covers taskbar when maximized

0

if you are using a title less / border less form  or FormBorderStyle.None then your form when maximized will cover the task bar

if you want the title less form to just expand  to working area of the screen and exclude the task bar then you need to set the maximum size of the form like

Me.MaximumSize = Screen.PrimaryScreen.WorkingArea.Size

also this will work for primary screen will not work in dual screen setup

suhailkaleem's RSS Feed
Go to Top