| Label1.Caption=App.Path Label2.Caption=Command$ |
| Screen.MousePointer= 99 ’用户鼠标类型 Screen.MouseIcon=LoadPicture("C:\ABC\1.ICO") ’读取鼠标的图标文件 |
| On Error GoTo ERR_LINE ... Label1.Caption=“正确执行” ERR_LINE: ... Label1.Caption=“出错了!” |
| On Error Resume Next ... Label1.Caption=“不管对不对都要执行” ... |
| Private Sub Form_KeyPress(KeyAscii As Integer) Me.Caption = Str(KeyAscii) ‘取得键盘输入的字符 ... End Sub |
| Sub CenterForm(frm As Form) ‘定义过程 frm.Move (Screen.width - frm.width) \ 2, (Screen.Height - frm.Height) \ 2 End Sub Private Sub Form_Load() CenterForm Me ’调用过程 End Sub |
| Private Sub Text1_GotFocus() Text1.SelStart = 0 Text1.SelLength = Len(Text1.Text) ’过程调用 End Sub |
关注此文的读者还看过: