找回密码
 加入
搜索
查看: 1499|回复: 9

请问如何取消上面菜单的最大化或直接去掉菜单上的最大化最小化

[复制链接]
发表于 2009-10-14 02:34:03 | 显示全部楼层 |阅读模式
本帖最后由 YoDe 于 2010-1-29 15:34 编辑

请问如何取消上面菜单的最大化或直接去掉菜单上的最大化最小化

#NoTrayIcon
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_Icon=..\Launcher.ico
#AutoIt3Wrapper_Outfile=生化危机5存档辅助工具.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Res_Comment=生化危机5存档辅助工具
#AutoIt3Wrapper_Res_Description=生化危机5存档辅助工具
#AutoIt3Wrapper_Res_Fileversion=1.0.0.0
#AutoIt3Wrapper_Res_LegalCopyright=版权所有(C)2002-2009 YoDe
#AutoIt3Wrapper_Res_Field=Email|640753@qq.com
#AutoIt3Wrapper_Res_Field=QQ/TM|640753
#AutoIt3Wrapper_Res_Field=作者:|YoDe
#AutoIt3Wrapper_Res_Field=产品版本|1.0.0.0
#AutoIt3Wrapper_Au3Check_Stop_OnWarning=y
#AutoIt3Wrapper_Run_Tidy=y
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#Region ;**** 参数创建于 AutoIt3Wrapper_GUI ****
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Opt("TrayOnEventMode", 1) ;应用OnEvent函数于系统托盘图标
Opt("guicloseonesc", 0) ;此处为程序运行时按下ESC不发送消息,否则按下ESC键后,退出程序
Opt("TrayAutoPause", 0)
Opt("TrayMenuMode", 1)
Opt("TrayIconHide", 1)

;以下是定义一些变量
FileInstall("SkinCrafterDll.dll", @TempDir & "\SkinCrafterDll.dll", 1)
FileInstall("vista.skf", @TempDir & "\vista.skf", 1)
FileInstall("logo.bmp", @TempDir & "\logo.bmp ", 1)
Dim $InstallPath
Dim $inputf
Dim $inputm
Dim $inputx
Dim $chkerr1
Dim $chkerr2
Dim $chkerr3
Dim $chkerr4
$Version = "生化危机5存档辅助工具"
If WinExists($Version) Then
        Exit
EndIf


#Region ### START Koda GUI section ### Form=

$Form1_1 = GUICreate("生化危机5存档辅助工具 作者:YoDe", 538, 409, 388, 251, BitOR($WS_SYSMENU, $WS_MINIMIZEBOX, $WS_CLIPSIBLINGS), $WS_EX_ACCEPTFILES)

_SkinGUI(@TempDir & "\SkinCrafterDll.dll", @TempDir & "\vista.skf", $Form1_1)
$Pic1 = GUICtrlCreatePic(@TempDir & "\logo.bmp", -4, -1, 543, 107, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
$Buttons = GUICtrlCreateButton("开始存档(&S)", 100, 330, 104, 36)
$Buttonr = GUICtrlCreateButton("读取存档(&R)", 310, 330, 104, 36)
$Group1 = GUICtrlCreateGroup("请选择您生化危机的存档路径", 8, 112, 521, 201)
$inputf = GUICtrlCreateInput("", 166, 148, 240, 21)
GUICtrlSetState(-1, $GUI_ACCEPTFILES) ;接受拖放文件
$inputx = GUICtrlCreateInput("", 165, 206, 240, 21)
GUICtrlSetState(-1, $GUI_ACCEPTFILES) ;接受拖放文件
$Labelf = GUICtrlCreateLabel("RESIDENT EVIL 5 路径:", 15, 156, 133, 17)
$Labelx = GUICtrlCreateLabel("XLive 路径:", 76, 210, 85, 25)
$Buttonf = GUICtrlCreateButton("选择路径(&F)", 426, 146, 84, 28)
$Buttonx = GUICtrlCreateButton("选择路径(&X)", 426, 205, 84, 28)
$Buttonm = GUICtrlCreateButton("选择路径(&M)", 425, 261, 84, 28)
$inputm = GUICtrlCreateInput(@DesktopDir & "\生化危机5存档", 164, 264, 240, 21)
GUICtrlSetState(-1, $GUI_ACCEPTFILES) ;接受拖放文件

$Label3 = GUICtrlCreateLabel("游戏存档 路径:", 56, 271, 90, 17)

GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Select
                Case $nMsg = $GUI_EVENT_CLOSE
                        ExitLoop
                Case $nMsg = $Buttonx
                        $open = openx()
                Case $nMsg = $Buttonm
                        $open = openm()
                Case $nMsg = $Buttonf
                        $open = openf()
                Case $nMsg = $Buttons
                        $open = savefile()
                Case $nMsg = $Buttonr
                        $open = readsave()
        EndSelect
WEnd
Func openf()
        ;AdlibDisable()
        $InstallPath = FileSelectFolder("选择安装目录", "") ;显示一个文件夹选择对话框
        If Not @error Then
                If StringRight($InstallPath, 1) = "\" Then ;StringRight为返回字符串中从右开始指定数量的字符
                        GUICtrlSetData($inputf, $InstallPath & "") ;GUICtrlSetData为修改指定控件的相关数据
                Else
                        GUICtrlSetData($inputf, $InstallPath & "\")
                EndIf
                ;MsgBox(4096, "测试", $InstallPath)
        EndIf
EndFunc   ;==>openf
Func openx()
        ;AdlibDisable()
        $InstallPath = FileSelectFolder("选择安装目录", "") ;显示一个文件夹选择对话框
        If Not @error Then
                If StringRight($InstallPath, 1) = "\" Then ;StringRight为返回字符串中从右开始指定数量的字符
                        GUICtrlSetData($inputx, $InstallPath & "") ;GUICtrlSetData为修改指定控件的相关数据
                Else
                        GUICtrlSetData($inputx, $InstallPath & "\")
                EndIf
                ;MsgBox(4096, "测试", $InstallPath)
        EndIf
EndFunc   ;==>openx
Func openm()
        ;AdlibDisable()
        $InstallPath = FileSelectFolder("选择安装目录", "") ;显示一个文件夹选择对话框
        If Not @error Then
                If StringRight($InstallPath, 1) = "\" Then ;StringRight为返回字符串中从右开始指定数量的字符
                        GUICtrlSetData($inputm, $InstallPath & "") ;GUICtrlSetData为修改指定控件的相关数据
                Else
                        GUICtrlSetData($inputm, $InstallPath & "\")
                EndIf
                ;MsgBox(4096, "测试", $InstallPath)
        EndIf
EndFunc   ;==>openm
;皮肤调用
Func _SkinGUI($SkincrafterDll, $SkincrafterSkin, $Handle)
        $Dll = DllOpen($SkincrafterDll)
        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 savefile()
        GUICtrlSetState($Buttons, $GUI_DISABLE)
        $myfiles = GUICtrlRead($inputf)
        $xlive = GUICtrlRead($inputx)
        $save = GUICtrlRead($inputm)
        ;DirCreate($save&"\XLive")
        $chkerr1 = DirCopy(@MyDocumentsDir & "\CAPCOM", $save, 1)
        $chkerr2 = DirCopy(@UserProfileDir & "\local Settings\Application Data\Microsoft\Xlive", $save & "\Xlive", 1)
        If $chkerr1 = 1 And $chkerr2 = 1 Then
                MsgBox(64, "温馨提示", "您的游戏已经存档完成")
        Else
                MsgBox(16, "温馨提示", "您存档的过程中遇到错误,请关闭游戏后再进行存档")
        EndIf
        GUICtrlSetState($Buttons, $GUI_ENABLE)
EndFunc   ;==>savefile


;读取存档文件
Func readsave()
        GUICtrlSetState($Buttonr, $GUI_DISABLE)
        $myfiles = GUICtrlRead($inputf)
        $xlive = GUICtrlRead($inputx)
        $chkerr3 = DirCopy($myfiles, @MyDocumentsDir & "\CAPCOM\RESIDENT EVIL 5", 1)
        $chkerr4 = DirCopy($xlive, @UserProfileDir & "\local Settings\Application Data\Microsoft\Xlive", 1)
        If $chkerr3 = 1 And $chkerr4 = 1 Then
                MsgBox(64, "温馨提示", "读取游戏存档成功")
        Else
                MsgBox(16, "温馨提示", "您存档的过程中遇到错误,请关闭游戏后再进行存档")
        EndIf
        GUICtrlSetState($Buttonr, $GUI_ENABLE)
EndFunc   ;==>readsave
发表于 2009-10-14 04:30:58 | 显示全部楼层

$Form1_1 = GUICreate("生化危机5存档辅助工具 作者:YoDe", 538, 409, 388, 251, BitOR($WS_SYSMENU, $WS_CLIPSIBLINGS, $WS_EX_TOOLWINDOW), $WS_EX_ACCEPTFILES)
 楼主| 发表于 2009-10-14 04:37:33 | 显示全部楼层
谢谢楼上的朋友 学习了
 楼主| 发表于 2009-10-14 05:08:33 | 显示全部楼层
不好意思 楼上的朋友 那个最大化还在啊 我说的是那个 在窗口标题栏上点右键的那个最大化。。
 楼主| 发表于 2009-10-14 05:14:34 | 显示全部楼层
$Form1_1 = GUICreate("生化危机5存档辅助工具 作者:YoDe", 538, 409, 388, 251, BitOR($WS_SYSMENU, $WS_MINIMIZEBOX,$WS_EX_MDICHILD, $WS_CLIPSIBLINGS), $WS_EX_ACCEPTFILES)

自己成功了 谢谢楼上的
 楼主| 发表于 2009-10-14 05:21:55 | 显示全部楼层
原来我那个代码能用的 只是奇怪 要过好多秒才反应的过来 那个最大化功能才会屏蔽掉 是软件本身的问题还是代码的问题?我那个原来的代码其实能用的。。。希望高手给个答案 有什么办法 一开软件就能用。。
发表于 2009-10-14 08:55:25 | 显示全部楼层
没出现你的问题,都是瞬开的。
发表于 2009-10-14 09:02:16 | 显示全部楼层

#NoTrayIcon
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_Icon=..\Launcher.ico
#AutoIt3Wrapper_Outfile=生化危机5存档辅助工具.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Res_Comment=生化危机5存档辅助工具
#AutoIt3Wrapper_Res_Description=生化危机5存档辅助工具
#AutoIt3Wrapper_Res_Fileversion=1.0.0.0
#AutoIt3Wrapper_Res_LegalCopyright=版权所有(C)2002-2009 YoDe
#AutoIt3Wrapper_Res_Field=Email|640753@qq.com
#AutoIt3Wrapper_Res_Field=QQ/TM|640753
#AutoIt3Wrapper_Res_Field=作者:|YoDe
#AutoIt3Wrapper_Res_Field=产品版本|1.0.0.0
#AutoIt3Wrapper_Au3Check_Stop_OnWarning=y
#AutoIt3Wrapper_Run_Tidy=y
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#Region ;**** 参数创建于 AutoIt3Wrapper_GUI ****
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Opt("TrayOnEventMode", 1) ;应用OnEvent函数于系统托盘图标
Opt("guicloseonesc", 0) ;此处为程序运行时按下ESC不发送消息,否则按下ESC键后,退出程序
Opt("TrayAutoPause", 0)
Opt("TrayMenuMode", 1)
Opt("TrayIconHide", 1)

;以下是定义一些变量
Dim $InstallPath
Dim $inputf
Dim $inputm
Dim $inputx
Dim $chkerr1
Dim $chkerr2
Dim $chkerr3
Dim $chkerr4

$Version = "生化危机5存档辅助工具"
If WinExists($Version) Then
        Exit
EndIf

$Form1_1 = GUICreate("生化危机5存档辅助工具 作者:YoDe", 538, 409, 388, 251, BitOR($WS_SYSMENU, $WS_EX_TOOLWINDOW))
FileInstall("SkinCrafterDll.dll", @TempDir & "\SkinCrafterDll.dll", 1)
FileInstall("vista.skf", @TempDir & "\vista.skf", 1)
FileInstall("logo.bmp", @TempDir & "\logo.bmp ", 1)

_SkinGUI(@TempDir & "\SkinCrafterDll.dll", @TempDir & "\vista.skf", $Form1_1)
$Pic1 = GUICtrlCreatePic(@TempDir & "\logo.bmp", -4, -1, 543, 107, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
$Buttons = GUICtrlCreateButton("开始存档(&S)", 100, 330, 104, 36)
$Buttonr = GUICtrlCreateButton("读取存档(&R)", 310, 330, 104, 36)
$Group1 = GUICtrlCreateGroup("请选择您生化危机的存档路径", 8, 112, 521, 201)
$inputf = GUICtrlCreateInput("", 166, 148, 240, 21)
GUICtrlSetState(-1, $GUI_ACCEPTFILES) ;接受拖放文件
$inputx = GUICtrlCreateInput("", 165, 206, 240, 21)
GUICtrlSetState(-1, $GUI_ACCEPTFILES) ;接受拖放文件
$Labelf = GUICtrlCreateLabel("RESIDENT EVIL 5 路径:", 15, 156, 133, 17)
$Labelx = GUICtrlCreateLabel("XLive 路径:", 76, 210, 85, 25)
$Buttonf = GUICtrlCreateButton("选择路径(&F)", 426, 146, 84, 28)
$Buttonx = GUICtrlCreateButton("选择路径(&X)", 426, 205, 84, 28)
$Buttonm = GUICtrlCreateButton("选择路径(&M)", 425, 261, 84, 28)
$inputm = GUICtrlCreateInput(@DesktopDir & "\生化危机5存档", 164, 264, 240, 21)
GUICtrlSetState(-1, $GUI_ACCEPTFILES) ;接受拖放文件

$Label3 = GUICtrlCreateLabel("游戏存档 路径:", 56, 271, 90, 17)

GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)


While 1
        $nMsg = GUIGetMsg()
        Select
                Case $nMsg = $GUI_EVENT_CLOSE
                        ExitLoop
                Case $nMsg = $Buttonx
                        $open = openx()
                Case $nMsg = $Buttonm
                        $open = openm()
                Case $nMsg = $Buttonf
                        $open = openf()
                Case $nMsg = $Buttons
                        $open = savefile()
                Case $nMsg = $Buttonr
                        $open = readsave()
        EndSelect
WEnd
Func openf()

EndFunc   ;==>openf
Func openx()

EndFunc   ;==>openx
Func openm()

EndFunc   ;==>openm
;皮肤调用
Func _SkinGUI($SkincrafterDll, $SkincrafterSkin, $Handle)

EndFunc   ;==>_SkinGUI


;保存存档文件
Func savefile()

EndFunc   ;==>savefile


;读取存档文件
Func readsave()

EndFunc   ;==>readsave
发表于 2009-10-14 10:17:50 | 显示全部楼层
生化危机5的游戏路径可以自动获取。
RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\CAPCOM\RESIDENT EVIL 5", "InstallDir")
发表于 2009-10-14 22:06:17 | 显示全部楼层
解决了麻烦改一下标题。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-4 18:01 , Processed in 0.070240 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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