다른 명령
Autoit 윈도우 리사이즈 크기는 현재창의 절반
<source lang=sql>
- include <GUIConstantsEx.au3>
- include <WindowsConstants.au3>
- 화면 크기의 3/4 구하기
Local $iScreenWidth = @DesktopWidth Local $iScreenHeight = @DesktopHeight Local $iWidth = Int($iScreenWidth * 0.5) Local $iHeight = Int($iScreenHeight * 0.7)
- GUI 생성 (WS_SIZEBOX 스타일 추가하여 창 크기 조정 가능하게 설정)
GUICreate("Resizable Menu Example", $iWidth, $iHeight, -1, -1, BitOR($WS_SIZEBOX, $WS_SYSMENU, $WS_CAPTION))
- 메뉴 생성
Local $hMenu = GUICtrlCreateMenu("File") Local $hOpenItem = GUICtrlCreateMenuItem("Open", $hMenu) Local $hSaveItem = GUICtrlCreateMenuItem("Save", $hMenu) GUICtrlCreateMenuItem("", $hMenu) ; 구분선 Local $hExitItem = GUICtrlCreateMenuItem("Exit", $hMenu)
Local $hHelpMenu = GUICtrlCreateMenu("Help") Local $hAboutItem = GUICtrlCreateMenuItem("About", $hHelpMenu)
- GUI 표시
GUISetState(@SW_SHOW)
- 메시지 루프
While 1
Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop
Case $hOpenItem MsgBox(0, "Menu Clicked", "You selected 'Open'.")
Case $hSaveItem MsgBox(0, "Menu Clicked", "You selected 'Save'.")
Case $hExitItem ExitLoop
Case $hAboutItem MsgBox(0, "About", "This is a resizable menu example created in AutoIt.") EndSwitch
WEnd
GUIDelete() Exit </souece>