【h5棋牌bc游戏娱乐源码】【sap 源码流程分析】【校园全景地图源码】日历 vb源码_日历源代码

时间:2024-12-28 05:52:17 来源:微信订餐系统源码下载 分类:焦点

1.VB编写日历
2.怎样用vb语言编写日历提示程序

日历 vb源码_日历源代码

VB编写日历

       工具箱选一下,日历日历h5棋牌bc游戏娱乐源码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