1、将form1的picture属性设置为一幅图片,将borderstyle属性设为none ,将startupposition设置为屏幕中心.
2、添加一窗体form2,在form2中添加一个退出按钮。
3、在form1中添加一个时钟控件,并将其interval属性设为1000
form1中的代码
Dim tt As Integer '对变量tt 进行声明
Private Sub Form_Load()
Timer1.Enabled = True
tt = 0
End Sub
Private Sub Timer1_Timer()
If tt > 3 Then
Timer1.Enabled = False
Unload Me
Form2.Show
Else
tt = tt + 1
End If
End Sub
form2中的代码
Private Sub Command1_Click()
kk = MsgBox("真的要退出吗?", 1 + 32, "请确认")
If kk = 1 Then
End
End If
End Sub