您的位置:程序门 -> vb -> 基础类



如果得知用戶按下了print screen鍵


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


如果得知用戶按下了print screen鍵[已结贴,结贴人:ymymym16888]
发表于:2007-06-20 19:21:45 楼主
問題如標題
print   screen鍵就是那個打印屏幕的那個鍵
我想在用戶不管做什麼時,只要一按print   screen鍵,就響應我的代碼.
发表于:2007-06-20 19:42:461楼 得分:0
写一个勾子,勾住键盘
发表于:2007-06-20 19:46:282楼 得分:0
hook   keyboard

wparam:   &h2c     'snapshot   key  
lparam   :   &hc1370001    

constant               value                   description  
vbkeyprint             &h2a                       print   screen   key  
vbkeysnapshot       &h2c                       snapshot   key  

select   case   umsg
      case   wm_keydown
              select   case   wparam
                    case   vbkeysnapshot
                          'your   code
                    case   vbkeyprint            
                            'your   code
                    case   else
                        'your   code
              end   select  
        end   select
end   select
发表于:2007-06-20 23:05:243楼 得分:50
private   declare   function   getasynckeystate   lib   "user32 "   (byval   vkey   as   long)   as   integer
private   const   vk_snapshot   =   &h2c

private   sub   timer1_timer()
        if   getasynckeystate(vk_snapshot   )   <>   0  
                  then   msgbox   "print   screen "
        endif
end   sub
发表于:2007-06-21 08:31:234楼 得分:0
关注


快速检索

最新资讯
热门点击