Jump to content

DoofGore

Members
  • Posts

    5
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

DoofGore's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Made Some changes and its working.. Thank you so much ... #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include <AutoItConstants.au3> #Region ### START Koda GUI section ### Form= Global $Form1 = GUICreate("Form1", 353, 209, 192, 114) Global $ONTOPON = GUICtrlCreateButton("ON TOP ON", 32, 40, 137, 65) Global $exit = GUICtrlCreateButton("EXIT", 105, 118, 137, 65) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") Global $ONTOPOFF = GUICtrlCreateButton("ON TOP OFF", 184, 41, 137, 65) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $ONTOPON Example($Form1, True) Case $ONTOPOFF Example($Form1, False) Case $exit Exit EndSwitch WEnd Func Example($Form1, $bTrue) ; Retrieve the handle of the active window. Local $hWnd = WinGetHandle("[ACTIVE]") If $bTrue Then ; Set the active window as being ontop using the handle returned by WinGetHandle. WinSetOnTop($hWnd, "", $WINDOWS_ONTOP) Else ; Wait for 2 seconds to display the change. Sleep(2000) ; Remove the "topmost" state from the active window. WinSetOnTop($hWnd, "", $WINDOWS_NOONTOP) EndIf EndFunc ;==>Example
  2. @Bilgus Thank you so much .... This is what i was asking for .. will give it a try now...
  3. I am confused how to write this function to set the gui on top on button click : Can you please provide some examples? So I can learn it how to make this function work.. Thanks
  4. Hello Melba23 I am playing around with WinSetOnTop but i didn't really understand it... it would be great if someone just explain how this is gona work.. Sorry for this noobish post..
  5. Hello All, My first post I know this is pretty noobish but I'm trying to find a way to make this gui working.. searched but as I'm new to autoit I don't understand much... I want to make this gui on top if we press ON TOP button and off on top function when we press on top off.. Created gui with koda ... any help would be appreciated Regards, #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= Global $Form1 = GUICreate("Form1", 353, 209, 192, 114) Global $ONTOPON = GUICtrlCreateButton("ON TOP ON", 32, 40, 137, 65) Global $exit = GUICtrlCreateButton("EXIT", 105, 118, 137, 65) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") Global $ONTOPOFF = GUICtrlCreateButton("ON TOP OFF", 184, 41, 137, 65) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $ONTOPON Case $ONTOPOFF Case $exit Exit EndSwitch WEnd
×
×
  • Create New...