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

[AU3基础] [已解决]窗口形状可否选择?

  [复制链接]
发表于 2013-5-17 09:24:15 | 显示全部楼层 |阅读模式
本帖最后由 oceanwind 于 2013-5-17 14:28 编辑

比如原长方形窗口横置,想点个按钮或checkbox变成竖置。
麻烦给个思路或例子
谢谢
发表于 2013-5-17 10:57:58 | 显示全部楼层
做两个窗口切换

评分

参与人数 1金钱 +10 收起 理由
oceanwind + 10 谢谢

查看全部评分

 楼主| 发表于 2013-5-17 11:32:00 | 显示全部楼层
做两个窗口切换
netegg 发表于 2013-5-17 10:57


两个窗口可共用代码?
发表于 2013-5-17 12:00:03 | 显示全部楼层
回复 3# oceanwind
坐标转换看你的设置
发表于 2013-5-17 12:00:54 | 显示全部楼层
代码可以共用,但是要处理好
 楼主| 发表于 2013-5-17 13:35:14 | 显示全部楼层
代码可以共用,但是要处理好
netegg 发表于 2013-5-17 12:00


单独作两个EXE文件倒是好办,但是又没共用代码。
不明白两个窗口如何共用代码的,元老能不能讲详细点
谢谢先
发表于 2013-5-17 14:10:58 | 显示全部楼层
Opt('GUIOnEventMode', 1)

$hGuiH = GUICreate('窗口切换', 600, 200)
GUISetOnEvent(-3, '_Exit')
$iBt1 = GUICtrlCreateButton('切换', 100, 100, 150, 25)
GUICtrlSetOnEvent(-1, '_Change')
GUICtrlCreateButton('测试', 100, 130, 150, 25)
GUICtrlSetOnEvent(-1, '_Test')
GUISetState()

$hGuiS = GUICreate('窗口切换', 200, 600)
GUISetOnEvent(-3, '_Exit')
$iBt2 = GUICtrlCreateButton('切换', 50, 400, 120, 25)
GUICtrlSetOnEvent(-1, '_Change')
GUICtrlCreateButton('测试', 50, 430, 120, 25)
GUICtrlSetOnEvent(-1, '_Test')

While 1
        Sleep(1000)
WEnd

Func _Change()
        Switch @GUI_CtrlId
                Case $iBt1
                        GUISetState(0, $hGuiH)
                        GUISetState(1, $hGuiS)
                Case $iBt2
                        GUISetState(0, $hGuiS)
                        GUISetState(1, $hGuiH)
        EndSwitch
EndFunc   ;==>_Change
Func _Test()
        MsgBox(0, '', 'Test')
EndFunc   ;==>_Test
Func _Exit()
        Exit
EndFunc   ;==>_Exit

评分

参与人数 1金钱 +10 收起 理由
oceanwind + 10 谢谢

查看全部评分

 楼主| 发表于 2013-5-17 14:27:45 | 显示全部楼层
回复 7# afan

谢谢,漂亮
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-2 01:53 , Processed in 0.085205 second(s), 28 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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