新网创想网站建设,新征程启航
为企业提供网站建设、域名注册、服务器等服务
textbox.text = "12345" " " "67890"
我们提供的服务有:成都做网站、网站制作、微信公众号开发、网站优化、网站认证、滴道ssl等。为超过千家企事业单位解决了网站和推广的问题。提供周到的售前咨询和贴心的售后服务,是有科学管理、有技术的滴道网站制作公司
或者
textbox.text = "12345" space(1) "67890"
用API函数,但是vb.net与vb6的API声明不一样的。代码如下:
Public Declare Sub keybd_event Lib "user32" Alias "keybd_event" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Integer, ByVal dwExtraInfo As Integer)
Const KEYEVENTF_KEYUP = H2
Const VK_SPACE = H20
Private Sub TextBox1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TextBox1.MouseClick
keybd_event(VK_SPACE, 0, 0, 0)
keybd_event(VK_SPACE, 0, KEYEVENTF_KEYUP, 0)
End Sub
如有问题,消息问我。我通常不看回答后的旧贴。
Private Sub Command1_Click() Timer1.Interval = 10000 End Sub Private Sub Timer1_Timer() SendKeys " " End Sub 如果是每10秒按一下空格好象还没必要运用钩子或API呢吧..加个timer和command 之后写这几行就应可以了