找回密码
 加入
搜索
查看: 3428|回复: 6

[GUI管理] AU3能设置置顶窗口在PUBWIN锁定界面外吗?

[复制链接]
发表于 2011-3-31 04:08:47 | 显示全部楼层 |阅读模式
一直想实现一个透明窗口置顶在PUBWIN锁定界面之外显示机器名称```````但似乎PUBWIN的置顶还真不好弄``
 楼主| 发表于 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] = 0
                        Return SetError(4, 0, 0)
                Case Else
                        Return 1
        EndSelect
        EndFunc   ;==>_API_SetLayeredWindowAttributes
发表于 2011-3-31 07:57:55 | 显示全部楼层
http://www.autoitx.com/thread-165-1-1.html

这个源码里有你想要的东西,自己去研究一下吧
 楼主| 发表于 2011-3-31 14:25:11 | 显示全部楼层
没钱下载````````````顶上去````````````````````````谁帮忙看看`````````````
 楼主| 发表于 2011-4-1 00:45:56 | 显示全部楼层
dddddddddddddddddddddddddd

评分

参与人数 1金钱 -50 收起 理由
guland -50 重复发帖,扣分警告!

查看全部评分

 楼主| 发表于 2011-4-1 23:22:39 | 显示全部楼层
dddddddddddddddddddddddddddddddddd
 楼主| 发表于 2011-4-2 22:23:14 | 显示全部楼层
dddddddddddddddddddddddddddddddddddd
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-20 13:43 , Processed in 0.089015 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表