新聞| | PChome| 登入
2007-10-25 23:13:55 | 人氣107| 回應0 | 上一篇 | 下一篇
推薦 0 收藏 0 轉貼0 訂閱站台

如何截取螢幕畫面

事實上,這是摸擬按下Print Screen的作法
Private Declare Sub keybd_event Lib "user32" 
(ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, 
ByVal dwExtraInfo As Long)
Const theScreen = 1
Const theForm = 0 '此項值為1時 COPY 某視窗畫面,程式需增加設定條件
Private Sub Command1_Click()
Call keybd_event(vbKeySnapshot, theForm, 0, 0)
'若theForm改成theScreen則Copy整個Screen
DoEvents
Picture1.Picture = Clipboard.GetData(vbCFBitmap)
End Sub

台長: Kenny
人氣(107) | 回應(0)| 推薦 (0)| 收藏 (0)| 轉寄
全站分類: 教育學習(進修、留學、學術研究、教育概況) | 個人分類: 程式設計 |
此分類下一篇:如何Restart Shell(Explorer.exe)
此分類上一篇:AutoRedraw與Image/Picture屬性的關聯

是 (若未登入"個人新聞台帳號"則看不到回覆唷!)
* 請輸入識別碼:
請輸入圖片中算式的結果(可能為0) 
(有*為必填)
TOP
詳全文