| 发表于:2007-01-31 20:56:121楼 得分:5 |
模擬qq隱藏窗口 declare function getcursorpos lib "user32 " (lppoint as pointapi) as long declare function getwindowrect lib "user32 " (byval hwnd as long, lprect as rect) as long declare function ptinrect lib "user32 " (lprect as rect, byval ptx as long, byval pty as long) as long declare function showwindow lib "user32 " (byval hwnd as long, byval ncmdshow as long) as long type pointapi x as long y as long end type type rect left as long top as long right as long bottom as long end type sub form_load() me.left = 0 end sub sub timer1_timer() dim mypoint as pointapi dim myrect as rect call getcursorpos(mypoint) call getwindowrect(me.hwnd, myrect) if ptinrect(myrect, mypoint.x, mypoint.y) = 0 then me.top = 0 - me.height + 10 showwindow me.hwnd, 0 else showwindow me.hwnd, 5 me.top = 0 end if end sub | | |
|