Jump to content
Sign in to follow this  
AustrianOak

Creating a "modal" dialog box

Recommended Posts

AustrianOak

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
aslani

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
AustrianOak

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
NELyon

_WinAPI_SetWindowLong()

Perhaps. I haven't used XSkin.

Share this post


Link to post
Share on other sites
aslani

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
AustrianOak

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
aslani

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
AustrianOak

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  

×