一个按纽 一个时钟
Private Sub Command1_Click()
Timer1.Interval = 100
if Timer1.Enabled = True then
Timer1.Enabled = False
else
Timer1.Enabled = True
end ifEnd SubPrivate Sub Form_Load()
Timer1.Enabled = False
End SubPrivate Sub Timer1_Timer()
SendKeys "{enter}"
End Sub
运行后将不停发送回车键
Private Sub Command1_Click()
Timer1.Interval = 100
if Timer1.Enabled = True then
Timer1.Enabled = False
else
Timer1.Enabled = True
end ifEnd SubPrivate Sub Form_Load()
Timer1.Enabled = False
End SubPrivate Sub Timer1_Timer()
SendKeys "{enter}"
End Sub
运行后将不停发送回车键
解决方案 »
- 请教一个日期转字符串的方法
- VB6.0里面如何处理ListBox中文本行的拖放?
- 急,谁用过RichText的SelProtect属性?
- 关于文本框中内容自动循环滚屏的问题(分值50)!!请各位兄弟、高手帮帮忙,急!在线等!
- 是否可以创建 recordset记录集 动态数组
- ado连接access。请高手指教。
- 菜鸟急问:如何引用一个COM组件并获得它的接口参数,能否提供点提示?200分酬谢!
- 便宜货,不买也来看看!!!!!!!!!!!!!!!!!!!!
- VB的界而的确容易制作,但似乎过于简单
- 各位VB高手求教
- 关于如何处理两个表之间数据的一致性
- 谁能告诉我哪里有中文版COM开发的电子书籍下载?????急!!!
option explicit
private theExeID as longprivate sub SendkeyToExe(byval ExePath as string)
theExeID=shell(exepath,1)
timer1.enable=true
timer1.inteval=300
end sub
private sub timer1_timer()
on error resume next
appactivate theExeID
sendkeys "{ENTER}"
if err.number<>0 then
timer1.enabled=false
endif
end sub
shell *.exe
next i
Step1:用FindWindow找到该窗口;
Step2:用FindWindowEx找到相应控件;
Step3:用SendMessage发送点击消息。
我回去试试