找回密码
 加入
搜索
查看: 2381|回复: 4

[GUI管理] 关于SHE皮肤的透明问题

  [复制链接]
发表于 2011-1-15 15:39:52 | 显示全部楼层 |阅读模式



我想搞一个,像上面图片显示一样的效果,把上勾,就半透明,勾去掉就不透明 (要马上勾上就马上透明的,)

代码如下
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=

$Path = @ScriptDir & ""
$Aero = IniRead(@ScriptDir & "\Config.ini", "Skin", "Aero", "")
$Form1 = GUICreate("Form1", 346, 159, 192, 124)
$Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 200, 112, 97, 17)
Skin()
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Checkbox1
                        If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then
                                IniWrite(@ScriptDir & "\Config.ini", "Skin", "Aero", "1")
                                Skin()
                        EndIf
                        If GUICtrlRead($Checkbox1) = $GUI_UNCHECKED Then
                                IniWrite(@ScriptDir & "\Config.ini", "Skin", "Aero", "0")
                                Skin()
                        EndIf
        EndSwitch
WEnd
Func Skin()
        $She = "Skin.she"
        $Dll = DllOpen($Path & 'Skin.dll')
        DllCall($Dll, "int", "SkinH_AttachEx", "str", $Path & $She, "str", "mhgd")
        DllCall($Dll, "int", "SkinH_SetAero", "int", $Aero)
EndFunc   ;==>Skin
我感觉这样子写应该是错的,请教高手指点。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2011-1-15 15:48:18 | 显示全部楼层
不明白?
发表于 2011-1-15 16:33:54 | 显示全部楼层
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=

;$Path = @ScriptDir & "\"
;$Aero = IniRead(@ScriptDir & "\Config.ini", "Skin", "Aero", "")
$She = @ScriptDir & "\qq2008.she"
$skin = @ScriptDir & "\Skin.dll"
Global $aero=255

$Form1 = GUICreate("Form1", 346, 159, 192, 124)
$Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 200, 112, 97, 17)
Skin($aero)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Checkbox1
                        If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then
                                $aero=150
                                Skin($aero)
                        EndIf
                        If GUICtrlRead($Checkbox1) = $GUI_UNCHECKED Then
                                $aero=255
                                Skin($aero)
                        EndIf
        EndSwitch
WEnd

Func Skin($x=255)
        $Dll = DllOpen($skin)
        DllCall($Dll, "int", "SkinH_AttachEx", "str",$She, "str", "benkel")
        DllCall($Dll, "int", "SkinH_SetAero", "int",0);0=不透明标题栏,1=透明标题栏
        DllCall($Dll, "int", "SkinH_SetWindowAlpha", "int",$Form1,"int",$x)
EndFunc   ;==>Skin
 楼主| 发表于 2011-1-15 16:54:07 | 显示全部楼层
回复 3# 3mile


    能直接改那一个透明标题栏嘛
发表于 2011-1-15 22:07:38 | 显示全部楼层
学习了。。。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-21 02:33 , Processed in 0.080655 second(s), 25 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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