Jump to content
Sign in to follow this  

Prevent all actions until form is filled out

Recommended Posts


Good Morning,

The other day I had a crazy idea, to create a transparent gui and then have a non-transparent gui form for a user to fill out. Up until now there has been a problem with users ignoring our login form because they can go about their business by opening apps, clicking on the start menu, etc. So I found a couple of postings of code for creating a transparent GUI. I modified it a little to fit the whole desktop. The only problem is that the user can no longer click on the desktop icons but they can click on the Start Menu and can still by pass our login form.

I am asking for some help with modifying my existing code so that the form still covers the desktop with a transparent gui with a second non-transparent gui (login form) on top. But prevent the user from alt-tabbing or pressing the windows key to open the start menu.

Here is my code:

#include <WindowsConstants.au3>
#include <GUIConstants.au3>
GUICreate('Transparent GUI', @DesktopWidth, @DesktopHeight, 0, 0, BitOR($WS_BORDER, $WS_POPUP), $WS_EX_TOOLWINDOW)
WinSetTrans('', '', 150)
GUICreate("Form", 300, 300, Default, Default, BitAND($WS_CAPTION, $WS_POPUP, $WS_SYSMENU), $WS_EX_CONTEXTHELP)
Local $hOkButton = GUICtrlCreateButton("&OK", 75, 225, 150)
    While 1
$nMsg = GUIGetMsg()
        Switch $nMsg
Case $hOkButton



Share this post

Link to post
Share on other sites

well, i would seriously HATE your script. this is MY computer and i want it to do what i want. so i won't help you ;)

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Share this post

Link to post
Share on other sites

at least you should make the form gui a child of the transparent, or the form gets beneath yout transparent gui and nothing goes

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Similar Content

    • therks
      By therks
      So I'm working on an application and I've hot keyed all the numbers, and for some reason this particular combination doesn't work. All the other numbers with Ctrl+Shift work fine, and all other combinations of modifiers work with 0. Has anyone else encountered this? It's very strange. 
      Guicreate('', 300, 300) $button = GUICtrlCreateButton('Button', 0, 0) Dim $accel = [ [ '^+0', $button ] ] GUIsetaccelerators($accel) Do $gm = guigetmsg()  If $gm = $button then msgbox(0,'','test') Until $gm = - 3 Sorry for the ugly code, i typed this up on my phone. 😅
    • rudi
      By rudi
      For a certain task I need to display a too long grid of controls.
      As I want to avoid to split this on multiple tabs, I'd like to use a scroll bar on the right hand side, as visible in this "manually faked" GUID below.
      Is this possible? Looking through the various GuiCtrlCreate*() functions, as well at the controls I can create using the Koda FormDesigner I couldn't see, howto...
      Regards, Rudi.

    • DoofGore
      By DoofGore
      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 
      #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  

    • computergroove
      By computergroove
      I've made a form in Koda where I make a list of 3 user definable elements that I want to be able to replicate with a button press so a user can add data that can be used as part of the program. 
      #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=D:\Carbonite Important\0 - Programing\Scite and Autoit\Koda\Forms\Mileage Estimator.kxf $Form1 = GUICreate("Save Project", 614, 1126, 298, 141) $Location = GUICtrlCreateInput("Location", 40, 112, 345, 21) $Distance = GUICtrlCreateInput("Distance", 400, 112, 89, 21) $AddLocation = GUICtrlCreateButton("AddLocation", 288, 80, 97, 25) $Label1 = GUICtrlCreateLabel("Location", 40, 88, 45, 17) $Label2 = GUICtrlCreateLabel("Distance", 400, 88, 46, 17) $HomeBase = GUICtrlCreateInput("HomeBase", 312, 32, 121, 21) $LeapYear = GUICtrlCreateCheckbox("LeapYear", 464, 32, 17, 17) $Label3 = GUICtrlCreateLabel("Leap Year?", 488, 32, 59, 17) $Variance = GUICtrlCreateInput("Variance", 504, 112, 81, 21) $Label4 = GUICtrlCreateLabel("Variance", 504, 88, 46, 17) $Label5 = GUICtrlCreateLabel("Home Base", 312, 8, 59, 17) $Button1 = GUICtrlCreateButton("Button1", 144, 56, 1, 57) $Save = GUICtrlCreateButton("Save Project", 40, 16, 121, 25) $Load = GUICtrlCreateButton("Load Project", 176, 16, 121, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Form1 Case $AddLocation EndSwitch WEnd I want to press the "add location" button and have the fields {Location, Distance and variance} create a new blank record located under the existing 3 input boxes. Since the fields can number over 30 locations in some examples I am thinking about having these items in a scrolling window. What is the best way to do this and can auto it add a variable while running by pressing a button?
    • XaelloNegative
      By XaelloNegative
      I made a small blunder with my code. I created the GUI under 1920x1080 resolution however, my user is configured to ONLY 1080x720 and cannot go any further than that.
      What do you guys think is the best way to correct this one? Resolution mathematics is something that came to mind however I do not have access to his PC to check  from time to time if  my estimation is correct and the resolution on my PC doesn't go down to 1080x720.
      Please help.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.