Sign in to follow this  
Followers 0
AustrianOak

Creating a "modal" dialog box

8 posts in this topic

how to i create a window that is like the edit color dialog box in microsoft paint where it is modal and requires immediate attention and i cannot access any other window until i close the modal window or take some certain action on it?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

how to i create a window that is like the edit color dialog box in microsoft paint where it is modal and requires immediate attention and i cannot access any other window until i close the modal window or take some certain action on it?

Use $DS_MODALFRAME and $DS_SETFOREGROUND

#include <WindowsConstants.au3>
GUICreate ( $title, $width, $height, $left, $top, $DS_MODALFRAME + $DS_SETFOREGROUND)
Edited by aslani

[font="Georgia"]Chances are, I'm wrong.[/font]HotKey trouble?Stringregexp GuideAutoIT Current Version

Share this post


Link to post
Share on other sites

is there any way i cant set those properties if im using an xskin gui.

i tried this but it locked my window and didn't work.

GUISetStyle($DS_MODALFRAME + $DS_SETFOREGROUND, $opdialog)

Share this post


Link to post
Share on other sites

_WinAPI_SetWindowLong()

Perhaps. I haven't used XSkin.

Share this post


Link to post
Share on other sites

is there any way i cant set those properties if im using an xskin gui.

i tried this but it locked my window and didn't work.

GUISetStyle($DS_MODALFRAME + $DS_SETFOREGROUND, $opdialog)
Try GUICtrlSetStyle()

[font="Georgia"]Chances are, I'm wrong.[/font]HotKey trouble?Stringregexp GuideAutoIT Current Version

Share this post


Link to post
Share on other sites

well my gui isn't locked anymore but it doesnt work. i can still access my main gui when my modal one is open..

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

well my gui isn't locked anymore but it doesnt work. i can still access my main gui when my modal one is open..

You have to set your main GUI to Disable when your modal GUI is active, then Enable when the modal GUI is closed

GUISetState (@SW_DISABLE, $gui_main)oÝ÷ Ø@ÈL]y×±jjey«­¢+Ù]¡¥±Ä($ÀÌØíµÍôU%Ñ5Í ¤($(%M±Ð($%
ÍÀÌØíµÍôÀÌØíU%}Y9Q}
1=M($$%á¥Ñ1½½À($$$($%
ÍÀÌØíµÍôÀÌØíµ½°($$%U%MÑMÑÑ¡M]}%M 1°ÀÌØíÕ¥}µ¥¸¤($$%U%MÑMÑÑ¡M]}M!=°ÀÌØíÕ¥}µ½°¤($$($%
ÍÀÌØíµÍôÀÌØíµ½±}±½Í¤($$%U%MÑMÑÑ¡M]}!%°ÀÌØíÕ¥}µ½°¤($$%U%MÑMÑÑ¡M]}9 1°ÀÌØíÕ¥}µ¥¸¤($$$(%¹M±Ð)]¹
Edited by aslani

[font="Georgia"]Chances are, I'm wrong.[/font]HotKey trouble?Stringregexp GuideAutoIT Current Version

Share this post


Link to post
Share on other sites

thanks! muttley

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  
Followers 0