Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <ButtonConstants.au3>
- #include <ComboConstants.au3>
- #include <GUIConstantsEx.au3>
- #include <StaticConstants.au3>
- #include <WindowsConstants.au3>
- Global $janela = 'disc creatures'
- #Region # GUI
- $Form1 = GUICreate("disc creatures", 268, 187, 254, 145)
- $game = GUICtrlCreateLabel("disc creatures", 8, 8, 251, 50)
- GUICtrlSetFont(-1, 30, 400, 0, "MS Sans Serif")
- $Resolucoes = GUICtrlCreateCombo("", 8, 56, 249, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
- GUICtrlSetFont(-1, 34, 400, 0, "MS Sans Serif")
- ; itens adicionais para o combobox.
- GUICtrlSetData($Resolucoes , "100%|150%|200%|250%|300%", "100%")
- ; botão para ativar a mudança da resolução.
- $Butt_OK = GUICtrlCreateButton("Change", 8, 128, 249, 49)
- GUISetState(@SW_SHOW)
- #EndRegion # GUI
- While 1
- Sleep(15)
- $nMsg = GUIGetMsg()
- Global $aPos = WinGetPos($janela)
- Switch $nMsg
- ; ao usar o botão.
- Case $Butt_OK
- If WinActivate('$janela', "") Then
- ; alterar resolução para 100% ( 480,420 )
- If GUICtrlRead($Resolucoes) = "100%" Then
- WinMove($janela, "",$aPos[0], $aPos[1],480,420 )
- ConsoleWrite('MUDANDO PARA 100%' & @CRLF)
- ; alterar resolução para 150% ( 720,630 )
- ElseIf GUICtrlRead($Resolucoes) = "150%" Then
- WinMove($janela, "",$aPos[0], $aPos[1],720,630 )
- ConsoleWrite('MUDANDO PARA 150%' & @CRLF)
- ; alterar resolução para 200% ( 960,840 )
- ElseIf GUICtrlRead($Resolucoes) = "200%" Then
- WinMove($janela, "",$aPos[0], $aPos[1],960,840 )
- ConsoleWrite('MUDANDO PARA 200%' & @CRLF)
- ; alterar resolução para 250% ( 1200,1050 )
- ElseIf GUICtrlRead($Resolucoes) = "250%" Then
- WinMove($janela, "",$aPos[0], $aPos[1],1200,1050)
- ConsoleWrite('MUDANDO PARA 200%' & @CRLF)
- ; alterar resolução para 250% ( 1440,1260 )
- ElseIf GUICtrlRead($Resolucoes) = "300%" Then
- WinMove($janela, "",$aPos[0], $aPos[1],1440,1260)
- ConsoleWrite('MUDANDO PARA 200%' & @CRLF)
- EndIf
- EndIf
- Case $GUI_EVENT_CLOSE
- Exit
- EndSwitch
- WEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement