- 最後登錄
- 2022-12-10
- 在線時間
- 0 小時
- 註冊時間
- 2005-7-8
- 閱讀權限
- 20
- 精華
- 0
- UID
- 73617
- 帖子
- 271
- 積分
- 49 點
- 潛水值
- 7125 米
| 若新密碼無法使用,可能是數據未更新。請使用舊密碼看看。 本帖最後由 悲傷 於 2012-7-26 02:14 PM 編輯
小弟最近又開始接觸VB ,又把高中的課本拿出來讀。但我想自製一個熱鍵程式(畢竟高中的課本資源有限),卻卡住了希望大大們可以幫我解決問題!!!!
還有請問執行後表單的框框怎麼設定
以下就是我的程式碼:- [/size][/font][/backcolor][/color]
- Private Sub Combo1_Click()
- Dim x
- x = Clear
- x = Combo1.ListIndex '將所選到的項目存到i
- Text1.Text = Combo1.List(x)
- End Sub
- Private Sub Combo2_Click()
- Dim y
- y = Clear
- y = Combo2.ListIndex '將所選到的項目存到i
- End Sub
- Private Sub Combo3_Click()
- Dim z
- z = Clear
- z = Combo3.ListIndex '將所選到的項目存到i
- End Sub
- Private Sub Command1_Click()
- If Command1.Caption = "啟動" Then
- Command1.Caption = "停止"
- Timer1.Enabled = True
- ms = Val(Text4.Text)
- Else
- Command1.Caption = "啟動"
- Timer1.Enabled = False
- End If
- End Sub
- Private Sub Timer1_Timer() '啟動10秒後執行第一次
- ms = ms - 1
- msLabel = ms
- Label1.Caption = msLabel
- If Combo1.List(x) = "F5" Then
- SendKeys "{F5}"
- DoEvents
- End If
- If Combo1.List(x) = F6 Then
- SendKeys "{F6}"
- End If
- If Combo1.List(x) = F7 Then
- SendKeys "{F7}"
- End If
- If Combo1.List(x) = F8 Then
- SendKeys "{F8}"
- End If
- DoEvents
- End Sub
- Private Sub Timer2_Timer() '啟動10秒後執行第一次
- SendKeys "{b}"
- DoEvents
- End Sub
- Private Sub Timer3_Timer() '啟動10秒後執行第一次
- SendKeys "{c}"
- DoEvents
- End Sub
- Private Sub Form_Load()
- Timer1.Interval = 1000
- End Sub[color=#444444][backcolor=rgb(253, 253, 253)][font=Verdana, Helvetica, Arial, sans-serif][size=12px]
複製代碼
... |
附件: 你需要登錄才可以下載或查看附件。沒有帳號?註冊 |