qsy666888 发表于 2018-3-30 17:31:53

窗口最大化时,控件的位置大小怎么才不能变动,求高手赐教(已解决)

本帖最后由 qsy666888 于 2018-4-1 09:07 编辑

在窗口拉大拉小时,控件的位置坐标位置,大小怎么才能不发生变动,即使窗口最大化,控件也保持着原始位置大小,小白一直没有搞出来,求高手赐教,谢谢!

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <GuiStatusBar.au3>
#include <ListViewConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
;Opt('GUIResizeMode', 1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 1054, 624, 191, 131,BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN))
$Tab1 = GUICtrlCreateTab(0, 0, 857, 569)
$TabSheet1 = GUICtrlCreateTabItem("TabSheet1")
$Group1 = GUICtrlCreateGroup("Group1", 8, 32, 841, 105)
$Button3 = GUICtrlCreateButton("Button3", 128, 64, 75, 25)
$Button4 = GUICtrlCreateButton("Button4", 128, 96, 75, 25)
$Button5 = GUICtrlCreateButton("Button5", 216, 64, 27, 57)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("Button1", 32, 64, 75, 25)
$Button2 = GUICtrlCreateButton("Button2", 32, 96, 75, 25)
$ListView1 = GUICtrlCreateListView("", 8, 144, 842, 414)
$TabSheet2 = GUICtrlCreateTabItem("TabSheet2")
$TabSheet3 = GUICtrlCreateTabItem("TabSheet3")
GUICtrlCreateTabItem("")
$Group2 = GUICtrlCreateGroup("Group2", 864, 26, 185, 545)
$List1 = GUICtrlCreateList("", 872, 40, 169, 513)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$StatusBar1 = _GUICtrlStatusBar_Create($Form1)
_GUICtrlStatusBar_SetMinHeight($StatusBar1, 27)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

        EndSwitch
WEnd

Alam 发表于 2018-3-30 18:29:02

GUICtrlSetResizing(-1, 802 );$GUI_DOCKALL

志艺风云 发表于 2018-3-30 18:47:58

看帮助的 GUICtrlSetResizing

qsy666888 发表于 2018-3-30 18:50:29

回复 2# Alam


    谢谢谢谢
页: [1]
查看完整版本: 窗口最大化时,控件的位置大小怎么才不能变动,求高手赐教(已解决)