怎样单击按钮 出来个文本框 输入文字 单击确定 改变caption名称
谢大家了 搞定 那怎样从启程序后不改变设置呢
- 贝贝
-
Private Sub Command1_Click()
Command1.Caption = InputBox("Command1.Caption=")
End Sub
如果不用InputBox的话,也可以
先设置一个文本框,Visible属性设为False,两个按钮,标题为Command1的属性随便,标题为Command2的Caption属性设为“确定”,Visible属性设为False
Private Sub Command1_Click()
Text1.Visible=True
Command2.Visible=True
Command1.Visible=False
End Sub
Private Sub Command2_Click()
Command1.Caption=Text1.Text
Command1.Visible=True
Text1.Visible=False
Command2.Visible=False
End Sub
- 再也不做稀饭了
-
Private Sub Command1_Click()
dim a as string
a = InputBox("请输入标题")
要改变名字的控件.caption(如果是文本框控件的话是TEXT) = a
end sub
- 真可
-
Private Sub Command1_Click()
bt = InputBox("请输入标题")
caption = bt
end sub
- 马老四
-
Option Explicit
Private Sub Command1_Click()
If Text1.Visible = False Then
Text1.Visible = True
Else
Text1.Visible = False
Me.Caption = Text1.Text
End If
End Sub
Private Sub Form_Load()
Text1.Visible = False
End Sub
- 苏州马小云
-
Private Sub Command1_Click()
me.caption= InputBox("请输入标题")
end sub