找回密码
 加入
搜索
查看: 2915|回复: 7

[AU3基础] 多界面切换窗口加载皮肤问题

  [复制链接]
发表于 2011-12-22 16:02:29 | 显示全部楼层 |阅读模式



问题如图所示

小弟使用在多个窗口切换的工具里用了 论坛上 辉哥皮肤动态链接库 的皮肤

发现一切换窗口试 皮肤就失效   不知道有没办法可以处理下呢

麻烦各位老师指点一二  谢谢
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Local $cB[04]
FileInstall("wmSkin.dll",@SystemDir&"\wmSkin.dll")
DllCall ( "wmSkin.dll", "none", "wmSkin" , "int", 24,"int", 1) 
$Form1 = GUICreate("Form1", 625, 443, -1, -1)
$Button1 = GUICtrlCreateButton("窗口1", 528, 40, 75, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton("窗口2", 528, 88, 75, 25, $WS_GROUP)
$Button3 = GUICtrlCreateButton("窗口3", 528, 136, 75, 25, $WS_GROUP)

$Form2 = GUICreate("Choices Dialog", 345, 252, 30, 30, $WS_CHILD,"", $Form1)
$bListBox1 = GUICtrlCreateList("", 8, 8, 137, 201)
GUICtrlSetData(-1, "Item1|Item2|Item3|Item4|Item5")
$bButton1 = GUICtrlCreateButton(">", 156, 15, 30, 25, $WS_GROUP)
$bButton2 = GUICtrlCreateButton(">>", 156, 48, 31, 25, $WS_GROUP)
$bButton3 = GUICtrlCreateButton("<", 157, 81, 31, 25, $WS_GROUP)
GUICtrlSetState(-1, $GUI_DISABLE)
$bButton4 = GUICtrlCreateButton("<<", 157, 114, 32, 25, $WS_GROUP)
$bListBox2 = GUICtrlCreateList("", 200, 8, 137, 201)
$bButton5 = GUICtrlCreateButton("&OK", 104, 225, 75, 25, $WS_GROUP)
$bButton6 = GUICtrlCreateButton("&Cancel", 184, 225, 75, 25, $WS_GROUP)
$bButton7 = GUICtrlCreateButton("&Help", 264, 225, 75, 25, $WS_GROUP)




$Form3 = GUICreate("Tabbed Notebook Dialog", 420, 320, 30, 30, $WS_CHILD,"", $Form1)
$cPageControl1 = GUICtrlCreateTab(8, 8, 396, 256)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$cTabSheet1 = GUICtrlCreateTabItem("TabSheet1")
$cTabSheet2 = GUICtrlCreateTabItem("TabSheet2")
$cTabSheet3 = GUICtrlCreateTabItem("TabSheet3")
GUICtrlCreateTabItem("")
$cB[01] = GUICtrlCreateButton("&OK", 166, 272, 75, 25, $WS_GROUP)
$cB[02] = GUICtrlCreateButton("&Cancel", 246, 272, 75, 25, $WS_GROUP)
$cB[03] = GUICtrlCreateButton("&Help", 328, 272, 75, 25, $WS_GROUP)




$Form4 = GUICreate("About", 340, 253, 30, 30, $WS_CHILD,"", $Form1)
$dGroupBox1 = GUICtrlCreateGroup("", 8, 8, 305, 185)
$dLabel1 = GUICtrlCreateLabel("Product Name", 152, 24, 72, 17, $WS_GROUP)
$dLabel2 = GUICtrlCreateLabel("Version", 152, 48, 39, 17, $WS_GROUP)
$dLabel4 = GUICtrlCreateLabel("Comments", 16, 160, 53, 17, $WS_GROUP)
$dLabel3 = GUICtrlCreateLabel("Copyright", 16, 136, 48, 17, $WS_GROUP)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$dButton1 = GUICtrlCreateButton("&OK", 112, 208, 75, 25, $WS_GROUP)

Local $Current = ""

GUISetState(@SW_SHOW, $Form1)


While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1
                        If $Current <> "" Then GUISetState(@SW_HIDE, $Current)
                        GUISetState(@SW_SHOW, $Form2)
                        $Current = $Form2
                Case $Button2
                        If $Current <> "" Then GUISetState(@SW_HIDE, $Current)
                        GUISetState(@SW_SHOW, $Form3)
                        $Current = $Form3                        
                Case $Button3
                        If $Current <> "" Then GUISetState(@SW_HIDE, $Current)
                        GUISetState(@SW_SHOW, $Form4)
                        $Current = $Form4                        
        EndSwitch
WEnd
皮肤附件

本帖子中包含更多资源

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

×
发表于 2011-12-22 17:42:01 | 显示全部楼层
很简单,多次加载皮肤呗呵呵
 楼主| 发表于 2011-12-22 18:17:19 | 显示全部楼层
额  拿也不行滴。。。。 难道这个问题没办法解决
 楼主| 发表于 2011-12-22 18:18:29 | 显示全部楼层
难道注定我这个工具 不能使用皮肤 ?
  试过换另种写法  但由于东西太多    切换的时候效果不理想  就这种写法灰常好  可惜皮肤呀 可惜呀
发表于 2011-12-23 09:06:00 | 显示全部楼层
你把代码发给我试试看哈
发表于 2011-12-23 10:20:03 | 显示全部楼层
思想很不错。值得学习
 楼主| 发表于 2011-12-23 22:49:02 | 显示全部楼层
回复 5# menfan1


    到嘛全部在上面呀
发表于 2011-12-24 10:16:44 | 显示全部楼层
在GUISetState(@SW_SHOW, $Form2)
GUISetState(@SW_SHOW, $Form3)
GUISetState(@SW_SHOW, $Form4)前都再加载一次皮肤吧
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-11-15 16:46 , Processed in 0.116106 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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