| 发表于:2007-01-19 18:21:515楼 得分:0 |
const hwnd_topmost = -1 const swp_nosize = &h1 const swp_nomove = &h2 const swp_showwindow = &h40 private declare sub setwindowpos lib "user32 " (byval hwnd as long, byval hwndinsertafter as long, byval x as long, byval y as long, byval cx as long, byval cy as long, byval wflags as long) private declare function getforegroundwindow lib "user32 " () as long private declare function setforegroundwindow lib "user32 " (byval hwnd as long) as long private declare sub keybd_event lib "user32 " (byval bvk as byte, byval bscan as byte, byval dwflags as long, byval dwextrainfo as long) dim s1, s2 as long private sub form_activate() setwindowpos me.hwnd, hwnd_topmost, 0, 0, 0, 0, swp_noactivate or swp_showwindow or swp_nomove or swp_nosize end sub private sub timer1_timer() s1 = getforegroundwindow if s1 <> me.hwnd then s2 = s1 end sub private sub command1_click() setforegroundwindow s2 keybd_event 65, 0, 0, 0 end sub 看到网上有以上的仿照程序,但与微软的屏幕键盘不同,它是焦点在2个窗口之间转换的,有没有不转换的 | | |
|