form1.frm
来自「这里有很多很实用的VB编程案例,方便大家学习VB.」· FRM 代码 · 共 95 行
FRM
95 行
VERSION 5.00
Begin VB.Form Form1
Caption = "TAB功能键"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "重填"
Height = 495
Left = 1560
TabIndex = 6
Top = 2280
Width = 1095
End
Begin VB.TextBox Text1
Height = 375
Index = 2
Left = 1440
TabIndex = 2
Top = 1440
Width = 1815
End
Begin VB.TextBox Text1
Height = 375
Index = 1
Left = 1440
TabIndex = 1
Top = 840
Width = 1815
End
Begin VB.TextBox Text1
Height = 375
Index = 0
Left = 1440
TabIndex = 0
Top = 240
Width = 1815
End
Begin VB.Label Label3
Caption = "网址:"
Height = 375
Left = 600
TabIndex = 5
Top = 1440
Width = 735
End
Begin VB.Label Label2
Caption = "邮箱:"
Height = 375
Left = 600
TabIndex = 4
Top = 840
Width = 735
End
Begin VB.Label Label1
Caption = "姓名:"
Height = 375
Left = 600
TabIndex = 3
Top = 240
Width = 735
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim i As Integer
For i = 0 To 2
Text1(i).Text = ""
Next i
Text1(0).SetFocus
End Sub
Private Sub Text1_GotFocus(Index As Integer)
Text1(Index).SelStart = 0
Text1(Index).SelLength = Len(Text1(Index).Text)
End Sub
Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys "{TAB}"
KeyAscii = 0
End If
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?