Private Sub Form_Load() Dim cTP As String Me.Caption = "装入底图" cTP = App.Path + "\tongji-2.bmp" If Dir(cTP, vbhidden) <> "" Then Me.Picture = LoadPicture(cTP) Else Me.BackColor = RGB(215, 238, 251) End If End Sub Private Sub Form_Click() Dim cTP As String Dim cTS As String Me.Caption = "单击窗体" cTP = App.Path + "\tongji.bmp" If Dir(cTP, vbhidden) <> "" Then Me.Picture = LoadPicture(cTP) cTS = "欢迎使用 VB !" Else cTS = "图片文件【" & cTP & "】不存在!" End If MsgBox cTS, 0 + 64, "单击窗体" End Sub Private Sub Form_DblClick() Dim cTS As String Me.Caption = "双击窗体" Me.Picture = LoadPicture("") MsgBox "结束使用 VB !", 0 + 64, "双击窗体" Unload Me: End End Sub