如何实现在vb里单击一个窗体后显示一个命令按钮

2024-11-18 21:46:31
推荐回答(3个)
回答1:

窗体中放一个commandbutton(按钮控件),可见性(Visible)设为False,然后写窗体点击事件代码
如果是点后就响应,则在Form_MouseDown上加代码,如果是点击然后鼠标松开后再响应,则在Form_Click中加代码。
代码如下Command1.Visible = True

回答2:

Private Sub Form_Load()
Command1.Visible = False
End Sub
Private Sub Form_Click()
Command1.Visible = ture
End Sub
你试试

回答3:

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Command1.Visible = True
End Sub

窗体中放一个command,可见性定为false,然后写窗体点击事件,就是上面的