VB calendar
2016-08-23
3k+ 0 0
4.0
Other
Earn points
VB calendar applet, is very useful to learn VB controls Private Sub picMonth_Paint ()
Dim i As Integer, j As Integer, x As Integer, y As Integer
Dim NumDays As Integer, CurrPos As Integer, bCurrMonth As Boolean
Dim MonthStart As Date, buffer As String
\'Determine if this month is today\'s month
If Month(m_CurrDate) = Month(Date) And Year(m_CurrDate) = Year(Date) Then
bCurrMonth = True
End If
\'Get first date in the month
MonthStart = DateSerial(Year(m_CurrDate), Month(m_CurrDate), 1)
\'Number of days in the month
NumDays = DateDiff("d", MonthStart, DateAdd("m", 1, MonthStart))
\'Get first weekday in the month (0 - based)
j = Weekday(MonthStart) - 1
\'Tweak for 1-based For/Next index
j = j - 1
\'Show current month/year
lblMonth = Format$(m_CurrDate, "mmmm yyyy")
\'Clear existing data
Dim i As Integer, j As Integer, x As Integer, y As Integer
Dim NumDays As Integer, CurrPos As Integer, bCurrMonth As Boolean
Dim MonthStart As Date, buffer As String
\'Determine if this month is today\'s month
If Month(m_CurrDate) = Month(Date) And Year(m_CurrDate) = Year(Date) Then
bCurrMonth = True
End If
\'Get first date in the month
MonthStart = DateSerial(Year(m_CurrDate), Month(m_CurrDate), 1)
\'Number of days in the month
NumDays = DateDiff("d", MonthStart, DateAdd("m", 1, MonthStart))
\'Get first weekday in the month (0 - based)
j = Weekday(MonthStart) - 1
\'Tweak for 1-based For/Next index
j = j - 1
\'Show current month/year
lblMonth = Format$(m_CurrDate, "mmmm yyyy")
\'Clear existing data
vb
程序
日历
Related Source Codes
Student Management System
0
0
no vote
FTP upload and download written in VB
0
0
no vote
Qq batch login
0
0
no vote
Example MSNPopup
0
0
no vote
Password management software
0
0
no vote
No comment