1.VB编写日历
2.怎样用vb语言编写日历提示程序
VB编写日历
工具箱选一下,日历日历android 重启源码流程microsoft windows common controls-2 6.0
里面有现成的日历控件,
当前时间 做个lable1 ,timer1
sub timer1_timer()
lable1.capteion = time
end sub
怎样用vb语言编写日历提示程序
用vb自带的calendar类就可以处理
Imports System
Imports System.Globalization
Public Class SamplesCalendar
Public Shared Sub Main()
' Sets a DateTime to April 3, of the Gregorian calendar.
Dim myDT As New DateTime(, 4, 3, New GregorianCalendar())
' Uses the default calendar of the InvariantCulture.
Dim myCal As Calendar = CultureInfo.InvariantCulture.Calendar
' Displays the values of the DateTime.
Console.WriteLine("April 3, of the Gregorian calendar:")
DisplayValues(myCal, myDT)
' Adds 5 to every component of the DateTime.
myDT = myCal.AddYears(myDT, 5)
myDT = myCal.AddMonths(myDT, 5)
myDT = myCal.AddWeeks(myDT, 5)
myDT = myCal.AddDays(myDT, 5)
myDT = myCal.AddHours(myDT, 5)
myDT = myCal.AddMinutes(myDT, 5)
myDT = myCal.AddSeconds(myDT, 5)
myDT = myCal.AddMilliseconds(myDT, 5)
' Displays the values of the DateTime.
Console.WriteLine("After adding 5 to each component of the DateTime:")
DisplayValues(myCal, myDT)
End Sub 'Main
Public Shared Sub DisplayValues(myCal As Calendar, myDT As DateTime)
Console.WriteLine(" Era: { 0}", myCal.GetEra(myDT))
Console.WriteLine(" Year: { 0}", myCal.GetYear(myDT))
Console.WriteLine(" Month: { 0}", myCal.GetMonth(myDT))
Console.WriteLine(" DayOfYear: { 0}", myCal.GetDayOfYear(myDT))
Console.WriteLine(" DayOfMonth: { 0}", myCal.GetDayOfMonth(myDT))
Console.WriteLine(" DayOfWeek: { 0}", myCal.GetDayOfWeek(myDT))
Console.WriteLine(" Hour: { 0}", myCal.GetHour(myDT))
Console.WriteLine(" Minute: { 0}", myCal.GetMinute(myDT))
Console.WriteLine(" Second: { 0}", myCal.GetSecond(myDT))
Console.WriteLine(" Milliseconds: { 0}", myCal.GetMilliseconds(myDT))
Console.WriteLine()
End Sub 'DisplayValues
End Class 'SamplesCalendar