xtfs 发表于 2011-3-31 04:08:47

AU3能设置置顶窗口在PUBWIN锁定界面外吗?

一直想实现一个透明窗口置顶在PUBWIN锁定界面之外显示机器名称```````但似乎PUBWIN的置顶还真不好弄``

xtfs 发表于 2011-3-31 07:01:59

请教如何让这个代码始终在最顶层,能不能做到在PUBWIN的锁屏界面上显示``#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 281, 181, 452, 114, $WS_POPUP, $WS_EX_LAYERED);方框宽高,坐标宽高
GUISetBkColor(0xABCDEF)
_API_SetLayeredWindowAttributes($Form1, 0xABCDEF)
$Label1 = GUICtrlCreateLabel(@ComputerName, 1, 16, 318, 112, -1, $GUI_WS_EX_PARENTDRAG);字幅宽高
GUICtrlSetFont(-1, 50, 400, 0, "黑体")
GUICtrlSetColor(-1, 0xFF0000)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
      $nMsg = GUIGetMsg()
      Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
      EndSwitch
WEnd

Func _API_SetLayeredWindowAttributes($hwnd, $i_transcolor, $Transparency = 255, $isColorRef = False)
      Local Const $AC_SRC_ALPHA = 1
      Local Const $ULW_ALPHA = 2
      Local Const $LWA_ALPHA = 0x2
      Local Const $LWA_COLORKEY = 0x1
      If Not $isColorRef Then
                $i_transcolor = Hex(String($i_transcolor), 6)
                $i_transcolor = Execute('0x00' & StringMid($i_transcolor, 5, 2) & StringMid($i_transcolor, 3, 2) & StringMid($i_transcolor, 1, 2))
      EndIf
      Local $Ret = DllCall("user32.dll", "int", "SetLayeredWindowAttributes", "hwnd", $hwnd, "long", $i_transcolor, "byte", $Transparency, "long", $LWA_COLORKEY + $LWA_ALPHA)
      Select
                Case @error
                        Return SetError(@error, 0, 0)
                Case $Ret = 0
                        Return SetError(4, 0, 0)
                Case Else
                        Return 1
      EndSelect
        EndFunc   ;==>_API_SetLayeredWindowAttributes

guland 发表于 2011-3-31 07:57:55

http://www.autoitx.com/thread-165-1-1.html

这个源码里有你想要的东西,自己去研究一下吧

xtfs 发表于 2011-3-31 14:25:11

没钱下载````````````顶上去````````````````````````谁帮忙看看`````````````

xtfs 发表于 2011-4-1 00:45:56

dddddddddddddddddddddddddd

xtfs 发表于 2011-4-1 23:22:39

dddddddddddddddddddddddddddddddddd

xtfs 发表于 2011-4-2 22:23:14

dddddddddddddddddddddddddddddddddddd
页: [1]
查看完整版本: AU3能设置置顶窗口在PUBWIN锁定界面外吗?