Jump to content
Sign in to follow this  
thepip3r

2 Questions: Gui spawned from Gui and disabling that parent Gui

Recommended Posts

thepip3r

Both questions pertain to the same scenario: I'm using a GuiCreate() to spawn a new window for the user to input parameters into the child gui and then when he clicks submit, the spawned gui passes those parameters back to the parent gui.

Question 1:

When the new gui is spawned, it brings up another Taskbar item. My question is when AutoIT form windows are spawned from others, is there a way to suppress the taskbar item from coming up so all of the taskbar items appear as just the main program one?

Question 2:

When that new gui is spawned from it's parent, is there an option I can change so that the parent gui goes to a "disabled" status until the new gui is cancelled or submitted? I'm not looking for code, just a push in the right direction. I examined the GUICreate() params and didn't see one that would afford me this.

TIA

Edited by thepip3r

My Additions:- RunAs AdminDeviant Fun:- Variable Sound Volume

Share this post


Link to post
Share on other sites
Ealric

Both questions pertain to the same scenario: I'm using a GuiCreate() to spawn a new window for the user to input parameters into the child gui and then when he clicks submit, the spawned gui passes those parameters back to the parent gui.

Question 1:

When the new gui is spawned, it brings up another Taskbar item. My question is when AutoIT form windows are spawned from others, is there a way to suppress the taskbar item from coming up so all of the taskbar items appear as just the main program one?

Question 2:

When that new gui is spawned from it's parent, is there an option I can change so that the parent gui goes to a "disabled" status until the new gui is cancelled or submitted? I'm not looking for code, just a push in the right direction. I examined the GUICreate() params and didn't see one that would afford me this.

TIA

Answer 1: Show me some code here so I can see what you are referring to as I cannot guess at how you wrote your child gui.

Answer 2: It depends on the "effect" you want the Parent gui to have. If you use disabled, it's still present but disabled. So, if you have a child gui sitting on top of the parent gui, it may distract from this. I generally like to hide the parent gui and unhide it when the child gui is closed.

GUISetState(@SW_HIDE, $parentGUI)

When the child GUI is finished and deleted/removed, you bring it back up using:

GUISetState(@SW_SHOW, $parentGUI)


My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic]

Share this post


Link to post
Share on other sites
Siao

When the new gui is spawned, it brings up another Taskbar item. My question is when AutoIT form windows are spawned from others, is there a way to suppress the taskbar item from coming up so all of the taskbar items appear as just the main program one?

1) Give the child GUI the $WS_EX_TOOLWINDOW ex.style, or, duh,

2) specify the main GUI as its parent as last option in child GuiCreate()

Edited by Siao

"be smart, drink your wine"

Share this post


Link to post
Share on other sites
Ealric

1) Give the child GUI the $WS_EX_TOOLWINDOW ex.style, or, duh,

2) specify the main GUI as its parent as last option in child GuiCreate()

Basically, here's an example of what Siao is saying for your #1 question:

$parentGUI = GUICreate("Parent GUI",100,100)
$childGUI = GUICreate("Child GUI",100,100,-1,-1,-1,$WS_EX_TOOLWINDOW,$parentGUI)

On the #2 question, see my post above, using this example.


My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic]

Share this post


Link to post
Share on other sites
thepip3r

Ealric: Thank you, I think that will be sufficient for what I'm looking for.

Siao: Thank you, I added this and it was exactly what I was looking for. I guess I should've RTFM a bit better. =P


My Additions:- RunAs AdminDeviant Fun:- Variable Sound Volume

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.