网络凯子 发表于 2011-1-15 15:39:52

关于SHE皮肤的透明问题




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

代码如下#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
我感觉这样子写应该是错的,请教高手指点。

5i5wei 发表于 2011-1-15 15:48:18

不明白?{:face (332):}

3mile 发表于 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


    能直接改那一个透明标题栏嘛

mo_shaojie 发表于 2011-1-15 22:07:38

学习了。。。
页: [1]
查看完整版本: 关于SHE皮肤的透明问题