一道有关vb编程的题目

2025-01-01 03:07:18
推荐回答(2个)
回答1:

Private Sub form_load()
Show
Label1.AutoSize = True
Label1.Caption = Str(Time())
Label1.Top = Val(Form1.Height) / 2 - Val(Label1.Height) / 2
Label1.Left = Val(Form1.Width) / 2 - Val(Label1.Width) / 2
Command1.Caption = "放大"
End Sub
Private Sub command1_click()
Label1.FontSize = Val(Label1.FontSize) * 3
Label1.Caption = Str(Time())
Label1.Top = Val(Form1.Height) / 2 - Val(Label1.Height) / 2
Label1.Left = Val(Form1.Width) / 2 - Val(Label1.Width) / 2
End Sub

回答2:

Label1.Caption = Now
now就是当前系统时间