怎样用vb语言编写日历提示程序

怎样用vb语言编写日历提示程序,第1张

用vb自带的calendar类就可以处理

Imports System

Imports SystemGlobalization

Public Class SamplesCalendar

Public Shared Sub Main()

' Sets a DateTime to April 3, 2002 of the Gregorian calendar

Dim myDT As New DateTime(2002, 4, 3, New GregorianCalendar())

' Uses the default calendar of the InvariantCulture

Dim myCal As Calendar = CultureInfoInvariantCultureCalendar

' Displays the values of the DateTime

ConsoleWriteLine("April 3, 2002 of the Gregorian calendar:")

DisplayValues(myCal, myDT)

' Adds 5 to every component of the DateTime

myDT = myCalAddYears(myDT, 5)

myDT = myCalAddMonths(myDT, 5)

myDT = myCalAddWeeks(myDT, 5)

myDT = myCalAddDays(myDT, 5)

myDT = myCalAddHours(myDT, 5)

myDT = myCalAddMinutes(myDT, 5)

myDT = myCalAddSeconds(myDT, 5)

myDT = myCalAddMilliseconds(myDT, 5)

' Displays the values of the DateTime

ConsoleWriteLine("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)

ConsoleWriteLine(" Era: {0}", myCalGetEra(myDT))

ConsoleWriteLine(" Year: {0}", myCalGetYear(myDT))

ConsoleWriteLine(" Month: {0}", myCalGetMonth(myDT))

ConsoleWriteLine(" DayOfYear: {0}", myCalGetDayOfYear(myDT))

ConsoleWriteLine(" DayOfMonth: {0}", myCalGetDayOfMonth(myDT))

ConsoleWriteLine(" DayOfWeek: {0}", myCalGetDayOfWeek(myDT))

ConsoleWriteLine(" Hour: {0}", myCalGetHour(myDT))

ConsoleWriteLine(" Minute: {0}", myCalGetMinute(myDT))

ConsoleWriteLine(" Second: {0}", myCalGetSecond(myDT))

ConsoleWriteLine(" Milliseconds: {0}", myCalGetMilliseconds(myDT))

ConsoleWriteLine()

End Sub 'DisplayValues

End Class 'SamplesCalendar

如果你要传的i,j和list1listindex有特定关系,可以不用再传i和j。实在没法一定要传试试下二法

方法一:增加vi,vj窗体级变量数组,

dim vi(100),vj(100)

Sub NewForm(s$,i,j)

Dim era As Form3

Set era = New Form3

eraCaption = s

eraShow

print i,j

End Sub

Private Sub List1_DblClick()

Dim i%

NewForm (CStr(List1list(list1listindex)),vi(list1listindex),vj(list1listindex))

End Sub

Private Sub ooo()

dim i,j

for i=1 to 10

i=i+1

j=j+2

List1AddItem names

vi(list1listindex)=i

vj(list1listindex)=j

next

End Sub

方法二:多用两个visible=false的listbox,list2和list3

Sub NewForm(s$,i,j)

Dim era As Form3

Set era = New Form3

eraCaption = s

eraShow

print i,j

End Sub

Private Sub List1_DblClick()

Dim i%

NewForm (CStr(List1list(list1listindex)),List2list(list1listindex),List3list(list1listindex))

End Sub

Private Sub ooo()

dim i,j

for i=1 to 10

i=i+1

j=j+2

List1AddItem names

List2AddItem i

List3AddItem j

next

End Sub

首先,ERA-interim转arl格式需要一些变量。

3D场所需变量有:Geopotential,Relative humidity,Temperature,U component of wind,V component of wind,Vertical velocity。全部选好后,Retrieve GRIB。

2D场选择Surface。选择好后,Retrieve GRIB。

然后选择Geopotential,选择好后,Retrieve GRIB。将所需数据下载好后,打开HYSPLIT的GUI,将下载的数据输入进转化程序

需要注意的是Numb levels需要改成37,因为我们下载的Pressure levels资料有37层,设置完毕后Process Data。将生成的数据进行检验,在hysplit中选择check file,就转化成功了。

以上就是关于怎样用vb语言编写日历提示程序全部的内容,包括:怎样用vb语言编写日历提示程序、Listbox向新窗体传值的问题、era5转arl等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zz/9617905.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-30
下一篇 2023-04-30

发表评论

登录后才能评论

评论列表(0条)

保存