Jump to content

Minimize a parent but not its child


Recommended Posts

How can I minimize a parent of a child window but not minimize the child? My code looks a bit like this:

#Include <GUIConstants.au3>

$parent = GUICreate("", 300, 300)
GUISetState()
$child = GUICreate("", 100, 100, -1, -1, -1, -1, $parent)
GUISetState()


While 1 
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_Event_Close
            Exit 0
    EndSelect
WEnd

:)

Link to comment
Share on other sites

  • Moderators

Kind of defeats the purpose of having a child window if you don't want the events of the parent to effect it ... wouldn't you agree?

Look at the styles in the help file (GUI Styles)... experiment.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Kind of defeats the purpose of having a child window if you don't want the events of the parent to effect it ... wouldn't you agree?

Look at the styles in the help file (GUI Styles)... experiment.

Not really, there are a lot of benefits of having a child window that doesn't minimize than not.

For the experiment I'm doing I get about 10 extra items in the taskbar when I create a non child window from my main window.

Link to comment
Share on other sites

  • Moderators

I still haven't found a solution to this problem. The closest thing I could find in the help file is $WS_EX_MDICHILD which pretty much has nothing to do with the problem at all.

Make separate "Non" child gui's... considering that controls are nothing more than child gui's, you're basically saying you don't want controls to be minimized with the gui.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

If I make "Non" child guis then every window will appear down at the taskbar and I dont want this.

You don't listen very well do you? I told you to look at the styles and experiment... specifically the Ex styles.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

Ever since your last reply I have been looking and I haven't found the right extended style.

Does it exist?

You must not be trying too hard, because yes it does exist, and there are only but a few to try.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

Ok, I honestly tried EVERY single extended style on my child window and NONE of them stayed visible when I minimized the parent. They all minimized too.

I haven't been talking about child windows since this thing started. I thought I explained you shouldn't be using them as child windows. I also thought I explained in a round about way to look at the EX styles for the other windows to not display in the taskbar.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Well after scanning through the styles I didn't see any that hid a window from the taskbar...

It's not just the taskbar either, if I don't create them as child windows each window created will be an application shown in task manager which I don't want.

Edit:

Does it really have to be this difficult?

Cant I just create them as childs and use a loop to hide restore each child when the parent is minimized?

Edited by nowagain
Link to comment
Share on other sites

  • Moderators

Well after scanning through the styles I didn't see any that hid a window from the taskbar...

It's not just the taskbar either, if I don't create them as child windows each window created will be an application shown in task manager which I don't want.

Edit:

Does it really have to be this difficult?

Cant I just create them as childs and use a loop to hide restore each child when the parent is minimized?

You're the one making it difficult by making it a child when you don't want it to react with the parent correctly.

Make the child GUIs non-child GUIs and use the extended style parameter with $WS_EX_TOOLWINDOW, But ehh... you tried "them all".

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...