Jump to content

Prevent all actions until form is filled out


 Share

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)
GUISetState(@SW_SHOW)
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)
 
GUISetState(@SW_SHOW)
 
    While 1
$nMsg = GUIGetMsg()
        Switch $nMsg
Case $hOkButton
Exit
 
 
EndSwitch
    WEnd

Thanks

Grimm

Link to comment
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]

Link to comment
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
 Share

×
×
  • Create New...