找回密码
 加入
搜索
查看: 1278|回复: 11

还是皮肤问题(在目录下运行正常,换目录运行不了)

[复制链接]
发表于 2009-9-2 20:27:01 | 显示全部楼层 |阅读模式
本帖最后由 feicuiboy 于 2009-9-9 07:19 编辑

#include <GUIConstantsEx.au3>


dim $form
$form=GUICreate("控制面板", 451, 437, 224, 146)
GUICtrlCreateGroup("控制面板", 8, 0, 433, 425)
$control = ObjCreate("Shell.Explorer.2")
$Obj = GUICtrlCreateObj($control, 16, 24, 417, 393)
$control.navigate("file:///::%7B20D04FE0-3AEA-1069-A2D8-08002B30309D%7D%5C::%7B21EC2020-3AEA-1069-A2DD-08002B30309D%7D")
$form=GUICreate("控制面板", 451, 437, 224, 146)
_SkinGUI("SkinCrafterDll.dll", "Accent.skf", $form)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
  Case $GUI_EVENT_CLOSE
   Quit()
            exit
    EndSwitch
WEnd

Func _SkinGUI($SkincrafterDll, $SkincrafterSkin, $Handle)
   $Dll = DllOpen("SkinCrafterDll.dll")
   DllCall($Dll, "int:cdecl", "InitLicenKeys", "wstr", "1", "wstr", "", "wstr", "1@1.com", "wstr", "1")
   DllCall($Dll, "int:cdecl", "InitDecoration", "int", 1)
   DllCall($Dll, "int:cdecl", "LoadSkinFromFile", "wstr", $SkincrafterSkin)
   DllCall($Dll, "int:cdecl", "DecorateAs", "int", $Handle, "int", 25)
   DllCall($Dll, "int:cdecl", "ApplySkin")
EndFunc      ;==_SkinGUI

Func Quit()
    GUISetState(@SW_HIDE)
$Dll = DllOpen("SkinCrafterDll.dll")
    DllCall($dll, "int:cdecl", "DeInitDecoration")
    DllCall($dll, "int:cdecl", "RemoveSkin")
    DllClose($dll)
        ;DirRemove(@AppDataDir&"\skin",1)
    Exit
EndFunc






疑问:SkinCrafterDll.dll和皮肤文件
需要在编译后的文件中用fileinstall先加载然后在调用吗??
运行完成退出前还需要在卸载??运行不了是否是这个问题??

本帖子中包含更多资源

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

×
发表于 2009-9-2 20:37:31 | 显示全部楼层
SkinCrafterDll.dll Accent.skf 都得跟着,或者打包进编译
 楼主| 发表于 2009-9-2 20:37:46 | 显示全部楼层
经测试,不是这个问题,高手指点下
 楼主| 发表于 2009-9-2 21:30:57 | 显示全部楼层
本帖最后由 feicuiboy 于 2009-9-2 21:34 编辑

已解决,是皮肤的路径问题。谢谢
在原来的自定义函数前加上 $Dll = DllOpen($dii9)($dll9为路径)即可

Func Quit()
    GUISetState(@SW_HIDE)
$Dll = DllOpen($dii9)
    DllCall($dll, "int:cdecl", "DeInitDecoration")
    DllCall($dll, "int:cdecl", "RemoveSkin")
    DllClose($dll)

    Exit
EndFunc

还有个问题:
用filedelete(路径)无法删除 SkinCrafterDll.dll这个文件,该如何操作
发表于 2009-9-2 21:48:21 | 显示全部楼层
加上皮肤,又老又丑
发表于 2009-9-2 21:53:22 | 显示全部楼层
加上皮肤,又老又丑
破帽遮颜 发表于 2009-9-2 21:48


同感~~~~~~~

ps, dll文件删不掉也就是那里DllOpen出了问题...
 楼主| 发表于 2009-9-2 22:09:43 | 显示全部楼层
但是DllOpen后面不是有个dllclose吗?
如果不加$Dll = DllOpen($dii9),又运行错误

指点指点,谢谢
 楼主| 发表于 2009-9-2 22:10:50 | 显示全部楼层
加上皮肤,又老又丑
破帽遮颜 发表于 2009-9-2 21:48



不加皮肤,也感觉界面不美观呀。
发表于 2009-9-2 22:14:45 | 显示全部楼层
在函数外声明 $Dll (即在你脚本前面 Dim $form, $Dll),然后去掉你之前的那句 $Dll = DllOpen($dii9)
即可

评分

参与人数 1金钱 +5 收起 理由
feicuiboy + 5 thanks,解决

查看全部评分

 楼主| 发表于 2009-9-9 07:19:15 | 显示全部楼层
thanks,解决
发表于 2009-11-24 15:57:09 | 显示全部楼层
LZ应该把最终的脚本放上来
发表于 2009-11-24 17:54:15 | 显示全部楼层
呵呵,不知道
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-6-16 09:44 , Processed in 0.087610 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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