找回密码
 加入
搜索
楼主: qsy666888

[AU3基础] 昨晚搞到晚12点,没有搞出来,求大侠写哈(已解决)

 火.. [复制链接]
发表于 2018-3-16 16:17:00 | 显示全部楼层
感觉阔以,  应该最近用的上!
 楼主| 发表于 2018-3-16 16:17:52 | 显示全部楼层
回复 15# austere
谢谢大侠,看来au3只能做到这样了,没有想到同一窗口下不能建立两个Tab,是au3的缺点
发表于 2018-3-16 16:19:56 | 显示全部楼层
回复 17# qsy666888

說話很奇怪

13樓範例 不就是 同一個窗口建立兩個 TAB???

不然13樓範例叫做甚麼??
 楼主| 发表于 2018-3-16 16:47:23 | 显示全部楼层
回复 18# kk_lee69

13楼例子,不能在标签框里建控件,建一个控件,四个标签框里面都有这个控件
 楼主| 发表于 2018-3-16 16:48:20 | 显示全部楼层
不知道还有没有更好的处理方法
发表于 2018-3-16 16:58:02 | 显示全部楼层
回复 19# qsy666888
    能不能秀出你的 程式碼
发表于 2018-3-16 17:19:17 | 显示全部楼层
 楼主| 发表于 2018-3-16 17:20:27 | 显示全部楼层
回复 21# kk_lee69

就是上一个贴子的那个软件,只是把框架弄好了,还没有写入功能,如果需要,发出来就是了
发表于 2018-3-17 10:30:59 | 显示全部楼层
回复 23# qsy666888


   参考了一下22楼提供的代码~   知道了为啥标题变灰,感谢提供链接~  因为我之前都是制作无标题的窗口,自己再做标题出来~   修改了一下代码就可以了
  至于楼主你说的窗口最大化这个,可以自己写个判断来调整子窗口
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <DateTimeConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 615, 437, -1, -1)
$Button1 = GUICtrlCreateButton("第一按钮", 512, 64, 75, 25)
$Button2 = GUICtrlCreateButton("第二按钮", 512, 120, 75, 25)
$Form2 = GUICreate("", 417, 305, 14, 28, $WS_CHILD, -1, $Form1)
$Form3 = GUICreate("", 417, 305, 14, 28, $WS_CHILD, -1, $Form1)

GUISetState(@SW_SHOW, $Form1)
GUISetState(@SW_SHOW, $Form2)
GUISetState(@SW_SHOW, $Form3)
GUISwitch($Form2)
$Tab1 = GUICtrlCreateTab(24, 48, 417, 305)
$TabSheet1 = GUICtrlCreateTabItem("第一个按钮标签1")
$Label1 = GUICtrlCreateLabel("Label1", 80, 96, 36, 17)
$Input1 = GUICtrlCreateInput("Input1", 48, 128, 121, 21)
$Input2 = GUICtrlCreateInput("Input2", 48, 152, 121, 21)
$Combo1 = GUICtrlCreateCombo("Combo1", 48, 184, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
$Date1 = GUICtrlCreateDate("2018/03/16 06:51:11", 48, 208, 186, 21)
$Group1 = GUICtrlCreateGroup("Group1", 216, 96, 185, 105)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button3 = GUICtrlCreateButton("Button3", 72, 248, 75, 25)
$TabSheet2 = GUICtrlCreateTabItem("第一按钮标签2")
;GUICtrlSetState(-1,$GUI_SHOW)
$Label2 = GUICtrlCreateLabel("Label2", 96, 88, 36, 17)
$Group2 = GUICtrlCreateGroup("Group2", 208, 104, 185, 105)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Input3 = GUICtrlCreateInput("Input3", 56, 152, 121, 21)
$Input4 = GUICtrlCreateInput("Input4", 56, 176, 121, 21)
$Combo2 = GUICtrlCreateCombo("Combo2", 56, 200, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
$Date2 = GUICtrlCreateDate("2018/03/16 06:52:54", 48, 224, 186, 21)
$Button4 = GUICtrlCreateButton("Button4", 80, 264, 75, 25)
GUICtrlCreateTabItem("")


GUISwitch($Form3)
$Tab2 = GUICtrlCreateTab(24, 48, 417, 305)
$TabSheet3 = GUICtrlCreateTabItem("第二个按钮标签1")
$Label3 = GUICtrlCreateLabel("Label1", 80, 96, 36, 17)
$Input5 = GUICtrlCreateInput("Input1", 48, 128, 121, 21)
$Input6 = GUICtrlCreateInput("Input2", 48, 152, 121, 21)
$Combo3 = GUICtrlCreateCombo("Combo1", 48, 184, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
$Date3 = GUICtrlCreateDate("2018/03/16 06:51:11", 48, 208, 186, 21)
$Group3 = GUICtrlCreateGroup("Group1", 216, 96, 185, 105)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button5 = GUICtrlCreateButton("Button3", 72, 248, 75, 25)
$TabSheet4 = GUICtrlCreateTabItem("第二按钮标签2")
GUICtrlSetState(-1,$GUI_SHOW)
$Group2 = GUICtrlCreateGroup("Group2", 224, 80, 185, 41)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button6 = GUICtrlCreateButton("Button4", 40, 88, 75, 25)
$Button7 = GUICtrlCreateButton("Button5", 120, 88, 75, 25)
$ListView1 = GUICtrlCreateListView("", 32, 128, 250, 150)
$TreeView1 = GUICtrlCreateTreeView(288, 128, 113, 209)
GUICtrlCreateTabItem("")

GUISetState(@SW_HIDE, $Form3)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit  
                Case $Button1
                        GUISetState(@SW_SHOW, $Form2)
                        GUISetState(@SW_HIDE, $Form3)
                Case $Button2
                        GUISetState(@SW_SHOW, $Form3)
                        GUISetState(@SW_HIDE, $Form2)
                                EndSwitch
WEnd
 楼主| 发表于 2018-3-17 15:27:58 | 显示全部楼层
回复 24# austere


    感谢大虾和22楼kk-lee69大虾提供帮助,看来au3还是比较强大
发表于 2018-3-21 15:04:44 | 显示全部楼层
你这个就是想要在一个窗口同位置有多个标签控件,按道理13楼的方法是对的,使用用户函数的标签控件管理,_GUICtrlTab_Create是能创建多个标签的,实际使用有问题那应该是这个函数的问题,有高手修改好它吗。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-6-1 12:51 , Processed in 0.078939 second(s), 14 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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