Jump to content

PoneToungthar

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by PoneToungthar

  1. I think there is only one way to prevent Tab and Arrow, disable GUICtrlSetState($iButton_1, $GUI_DISABLE) and re-enable every time we use _GUIDisable function. #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #include <WindowsConstants.au3> #include "_GUIDisable.au3" _Main() Func _Main() Local $hGUI, $iButton_1, $iButton_2, $iLabel, $iTimer $hGUI = GUICreate("_GUIDisable_but_Tab_Enable", 300, 100, -1, -1, BitXOR($GUI_SS_DEFAULT_GUI, $WS_SIZEBOX, $WS_MINIMIZEBOX)) $iButton_1 = GUICtrlCreateButton("Effect 1", 190, 70, 100, 25) GUICtrlSetResizing(-1, $GUI_DOCKLEFT + $GUI_DOCKSIZE + $GUI_DOCKTOP) $iButton_2 = GUICtrlCreateButton("TAB Enabled :(", 10, 70, 100, 25) GUICtrlSetResizing(-1, $GUI_DOCKLEFT + $GUI_DOCKSIZE + $GUI_DOCKTOP) GUISetState(@SW_SHOW, $hGUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $iButton_2 Exit Case $iButton_1 _GUIDisable(-1, 1, 25) ; Enable the dimmed effect on the current GUI with the animation turned on. GUICtrlSetState($iButton_1, $GUI_DISABLE) GUICtrlSetState($iButton_2, $GUI_DISABLE) $iLabel = GUICtrlCreateLabel("SimpleText", 5, 5) ; Create a label with some text after calling _GUIDisable(). MsgBox(0, "Hello", "Now we can't use TAB and Arrow key to select controls.", 0, $hGUI) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) $iTimer = TimerInit() Do If GUIGetMsg() = $GUI_EVENT_CLOSE Then ; Exit the loop if $GUI_EVENT_CLOSE is captured by GUIGetMsg(). ExitLoop EndIf Sleep(10) Until TimerDiff($iTimer) > 3000 GUICtrlDelete($iLabel) ; Delete the control before closing _GUIDisable() _GUIDisable(-1, 1) ; Disable the dimmed effect with the animation turned on and add focus to the current GUI. GUICtrlSetState($iButton_1, $GUI_ENABLE) GUICtrlSetState($iButton_2, $GUI_ENABLE) EndSwitch WEnd EndFunc ;==>_Main
  2. Thanks @Nine That is the way what i need. It's work. Thank you so much. But Left and Right Arrow Key are still working.. to select buttons..
  3. 14 year later, No One mention about tab, when disable gui, still enable buttons and other GUICtrl are chose with tab. I try GUICtrlSetStyle($button1, 0) to prevent tab disable but Image from button are not working. So I Make like GUICtrlSetState($disabledbutton, $GUI_FOCUS) trick. I added GUICtrlSetState($iLabel, $GUI_FOCUS) to the _GUIDisable main udf. Is there any other way to prevent to TAB. #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #include <WindowsConstants.au3> #include "_GUIDisable.au3" _Main() Func _Main() Local $hGUI, $iButton_1,$iButton_2, $iLabel, $iTimer $hGUI = GUICreate("_GUIDisable_but_Tab_Enable", 300, 100, -1, -1, BitXOR($GUI_SS_DEFAULT_GUI, $WS_SIZEBOX, $WS_MINIMIZEBOX)) $iButton_1 = GUICtrlCreateButton("Effect 1", 190, 70, 100, 25) GUICtrlSetResizing(-1, $GUI_DOCKLEFT + $GUI_DOCKSIZE + $GUI_DOCKTOP) $iButton_2 = GUICtrlCreateButton("TAB Enabled :(", 10, 70, 100, 25) GUICtrlSetResizing(-1, $GUI_DOCKLEFT + $GUI_DOCKSIZE + $GUI_DOCKTOP) GUISetState(@SW_SHOW, $hGUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $iButton_2 Exit Case $iButton_1 _GUIDisable(-1, 1, 25) ; Enable the dimmed effect on the current GUI with the animation turned on. $iLabel = GUICtrlCreateLabel("SimpleText", 5, 5) ; Create a label with some text after calling _GUIDisable(). MsgBox(0, "Hello", "Press TAB Key to focus the buttons", 0, $hGUI) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) $iTimer = TimerInit() Do If GUIGetMsg() = $GUI_EVENT_CLOSE Then ; Exit the loop if $GUI_EVENT_CLOSE is captured by GUIGetMsg(). ExitLoop EndIf Sleep(10) Until TimerDiff($iTimer) > 3000 GUICtrlDelete($iLabel) ; Delete the control before closing _GUIDisable() _GUIDisable(-1, 1) ; Disable the dimmed effect with the animation turned on and add focus to the current GUI. EndSwitch WEnd EndFunc ;==>_Main
  4. Thanks but also showing full screen i want to change the image size to fit in gui width 1000 and 562. I will try _GDIPlus_ImageScale Function. Thanks a lot.
  5. How can i resize the image cause my gui is Width 1000 and Height 562? WebP Example1.au3
  6. Hi I demolpiled someon´s exe file using official decompiler for code knowledge but there are no functions and parameter codes, such as "$00535332fd" I think these are binary code. Is that true? My question is can I make my script like this? Thank.
  7. Hi I am newbie Autoit user, how can I protect my compiled autoit script file, that cannot be decompiled? Thank.
  8. Hi I am newbie Autoit user, I can create Treeview Item but it is not checkbox. How to make Treeview Item with checkbox. And in treeview item can add custom icon? Thank.
  9. Thank for reply. Here is the script.
  10. I Decompiled a .exe file to .au3 using Exe2aut.exe. It decompiled but I cannot run decompiled .au3 file. It have an error occure, What can i do?
×
×
  • Create New...