本帖最后由 haijie1223 于 2017-8-9 08:01 编辑
看到这个源码:http://bbs.wuyou.net/forum.php?mod=viewthread&tid=387383
不懂易语言,还是用其它的办法实现吧。
1、PECMD命令:
每次刷新explorer之后,运行下面这个命令,当然开机第一次进入桌面也要运行。
- CALL $--ret:hHwnd user32.dll,FindWindowW,Shell_TrayWnd,
- CALL $user32.dll,SendMessageW,#%hHwnd%,#1466,#0,#0
复制代码
2、AU3写法:
- #NoTrayIcon
- Local $Msg=_RegisterWindowMessage('TaskbarCreated')
- GUICreate('')
- GUISetState(@SW_HIDE)
- GUIRegisterMsg($Msg,'_ShowDeskTopMsg')
- _ShowDeskTopMsg()
- While 1
- Sleep(10)
- WEnd
- Func _ShowDeskTopMsg()
- _SendMessage(WinGetHandle('[Class:Shell_TrayWnd]'), 1466, 0, 0)
- EndFunc
- Func _SendMessage($hWnd, $iMsg, $wParam = 0, $lParam = 0, $iReturn = 0, $wParamType = "wparam", $lParamType = "lparam", $sReturnType = "lresult")
- Local $aResult = DllCall("user32.dll", $sReturnType, "SendMessageW", "hwnd", $hWnd, "uint", $iMsg, $wParamType, $wParam, $lParamType, $lParam)
- If @error Then Return SetError(@error, @extended, "")
- If $iReturn >= 0 And $iReturn <= 4 Then Return $aResult[$iReturn]
- Return $aResult
- EndFunc ;==>_SendMessage
- Func _RegisterWindowMessage($sMessage)
- Local $aResult = DllCall("user32.dll", "uint", "RegisterWindowMessageW", "wstr", $sMessage)
- If @error Then Return SetError(@error, @extended, 0)
- Return $aResult[0]
- EndFunc ;==>_WinAPI_RegisterWindowMessage
复制代码 |