Jump to content
Sign in to follow this  
monochrome90

some help needed with my gui...

Recommended Posts

monochrome90

how to create gui that have only close button, but no minimize and maximize?

And is it possible to dissable everything but my gui? Can i Dissable everything but may gui and pc mouse?

Share this post


Link to post
Share on other sites
BigDod

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 454, 193, 115, BitOR($WS_SYSMENU,$WS_CAPTION,$WS_POPUP,$WS_POPUPWINDOW,$WS_BORDER,$WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites
monochrome90

thanx, it works great, but what about second question? - "And is it possible to dissable everything but my gui? Can i Dissable everything but may gui and pc mouse?"

Share this post


Link to post
Share on other sites
JusGellin

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 454, 193, 115, BitOR($WS_SYSMENU,$WS_CAPTION,$WS_POPUP,$WS_POPUPWINDOW,$WS_BORDER,$WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd
Why do you use all the other settings to do this? It looks like only $WS_SYSMENU does the job. Is this just good programming practice to use the others? I was just wondering.

Share this post


Link to post
Share on other sites
BigDod

Why do you use all the other settings to do this? It looks like only $WS_SYSMENU does the job. Is this just good programming practice to use the others? I was just wondering.

The other settings are standard when you use Koda.


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites
rasim

thanx, it works great, but what about second question? - "And is it possible to dissable everything but my gui? Can i Dissable everything but may gui and pc mouse?"

GUISetState(@SW_DISABLE, $hGui)

Share this post


Link to post
Share on other sites
monochrome90

Was there a mistake? I cant lounch my GUI, this error is poping up...

GUISetState(@SW_DISABLE, $hGui)
GUISetState(@SW_DISABLE, ^ ERROR

Share this post


Link to post
Share on other sites
rasim

Was there a mistake? I cant lounch my GUI, this error is poping up...

GUISetState(@SW_DISABLE, $hGui)
GUISetState(@SW_DISABLE, ^ ERROR
$hGui this is variable contain a gui window handle.

$hGui = GUICreate("Form1", 633, 454, 193, 115, $WS_SYSMENU)

You also can use function so:

GUISetState(@SW_DISABLE)
if you not have a multi window gui.

:D

Share this post


Link to post
Share on other sites
monochrome90

ASIM, thnx for helping, but you didn't understand what i was asking. what i was asking for, is it possible to disabble everything, but my gui keep worling? like everything would go gray and unusable till my gui finish working?

After adding your suggested commands my gui gets invisible...

Share this post


Link to post
Share on other sites
james3mg

ASIM, thnx for helping, but you didn't understand what i was asking. what i was asking for, is it possible to disabble everything, but my gui keep worling? like everything would go gray and unusable till my gui finish working?

After adding your suggested commands my gui gets invisible...

What's "everything"? Other windows not a part of your script? Your Desktop? Start Menu? Taskbar clock?

My feeling is you're trying to basically re-create the feel of Vista's UAC prompt? I *believe* (could be wrong) even MS does this by taking a screenshot of the desktop, applying 'dimming' graphical effects to it, setting that as the background for their GUI (SecureDesktop) (which is set to AlwaysOnTop and very actively keeps itself there), then displaying the dialog over that...you won't be able to be quite as secure as SecureDesktop, but you could come close.


"There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110

Share this post


Link to post
Share on other sites
Thatsgreat2345

You going to have to use GuiCtrlSetState(CONTROL,$GUI_DISABLE)

Share this post


Link to post
Share on other sites
rasim

After adding your suggested commands my gui gets invisible...

Before disable a GUI you must set GUI window to visible:
GUISetState(@SW_SHOW, $hGUI)

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  

×

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.