form1.frm
来自「这里有很多很实用的VB编程案例,方便大家学习VB.」· FRM 代码 · 共 53 行
FRM
53 行
VERSION 5.00
Begin VB.Form Form1
Caption = "文本框"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "选中文字"
Height = 495
Left = 960
TabIndex = 2
Top = 2160
Width = 2175
End
Begin VB.CommandButton Command1
Caption = "显示文字"
Height = 495
Left = 960
TabIndex = 1
Top = 1560
Width = 2175
End
Begin VB.TextBox Text1
Height = 375
Left = 960
TabIndex = 0
Text = "Text1"
Top = 240
Width = 3375
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()
Text1.Text = "照猫画虎"
End Sub
Private Sub Command2_Click()
Dim k As Integer
Text1.SetFocus
k = Len(Text1.Text)
Text1.SelStart = 0
Text1.SelLength = k
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?