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

[AU3基础] 按钮和窗口一起放大

[复制链接]
发表于 2012-2-20 16:29:57 | 显示全部楼层 |阅读模式
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 317, 259, Default, Default, BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_TABSTOP))
$Group1 = GUICtrlCreateGroup("", 0, 0, 313, 257)
$Button1 = GUICtrlCreateButton("A", 8, 16, 145, 73)
GUICtrlSetFont(-1, 24, 800, 0, "MS Sans Serif")
$Button2 = GUICtrlCreateButton("B", 160, 16, 145, 73)
GUICtrlSetFont(-1, 24, 800, 0, "MS Sans Serif")
$Button3 = GUICtrlCreateButton("C", 8, 96, 145, 73)
GUICtrlSetFont(-1, 24, 800, 0, "MS Sans Serif")
$Button4 = GUICtrlCreateButton("D", 160, 96, 145, 73)
GUICtrlSetFont(-1, 24, 800, 0, "MS Sans Serif")
$Button5 = GUICtrlCreateButton("E", 8, 176, 145, 73)
GUICtrlSetFont(-1, 24, 800, 0, "MS Sans Serif")
$Button6 = GUICtrlCreateButton("F", 160, 176, 145, 73)
GUICtrlSetFont(-1, 24, 800, 0, "MS Sans Serif")
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
Global $ws
Dim $keyButton[6][2] = [["{a}", $Button1],["{b}", $Button2], _
                ["{c}", $Button3],["{d}", $Button4],["{e}", $Button5],["{f}", $Button6]]
GUISetAccelerators($keyButton, $Form1)

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1, $Button2, $Button3, $Button4, $Button5, $Button6
                        GUISetState(@SW_HIDE, $Form1)
                        $ws = MsgBox(1 + 0x40 + 0x40000, "测试", "您选择的是:" & GUICtrlRead($nMsg) & "按钮")
                        GUISetState(@SW_SHOW, $Form1)
                        If $ws = 2 Then
                                Exit
                        EndIf
        EndSwitch
WEnd
如题,怎么才能使按钮和窗口一起放大
发表于 2012-2-20 16:38:59 | 显示全部楼层
Opt('GUIResizeMode', 1)
 楼主| 发表于 2012-2-20 16:44:36 | 显示全部楼层
回复 2# afan

谢谢了,兄弟,自己弄的一下午都没弄好
发表于 2014-12-4 09:08:47 | 显示全部楼层
学习了,感谢分享
发表于 2014-12-4 12:45:17 | 显示全部楼层
谢谢,学习一下
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-12-28 09:26 , Processed in 0.171640 second(s), 22 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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