本帖最后由 lixiaolong 于 2012-2-29 18:33 编辑
回复 18# sanmoking
这个怎么样?XP不行Win7成功.
Global Const $WM_MOVE = 0x0003
Global Const $WM_LBUTTONDOWN = 0x0201
Global Const $GUI_RUNDEFMSG = 'GUI_RUNDEFMSG'
Global $TrayWnd = WinGetHandle('[CLASS:Shell_TrayWnd]')
$Width = 500
$Hight = 300
$WinHight = @DesktopHeight - 38 - $Hight
$hGui = GUICreate('窗口非置顶显示但永久覆盖桌面任务栏 by lixiaolong', $Width, $Hight, -1, -1)
GUISetState()
GUIRegisterMsg($WM_MOVE, "WM_MOVE")
While 1
$msg = GUIGetMsg()
If Not WinActive($hGui) Then
WinSetOnTop($hGui, '', 0)
EndIf
Switch $msg
Case -3
Exit
Case -7
WinSetOnTop($TrayWnd, '', 0)
WinSetOnTop($hGui, '', 1)
WinSetOnTop($hGui, '', 0)
EndSwitch
WEnd
Func WM_MOVE($hWnd, $iMsg, $iwParam, $ilParam)
#forceref $hWnd, $iMsg, $iwParam, $ilParam
Local $nY = BitShift($ilParam, 16)
If $nY > $WinHight Then WinSetOnTop($hGui, '', 1)
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_MOVE
|