Sign in to follow this  
Followers 0
jackal07

Minimize Window

13 posts in this topic

Is there a way to make my window minimize without minimizing its child windows?

Share this post


Link to post
Share on other sites



Yes, Look in the helpfile.

WinSetState("MAINWINDOWNAME", "", @SW_MINIMIZE)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

That minimizes the childs too. :)

Edited by jackal07

Share this post


Link to post
Share on other sites

any suggestions?

Share this post


Link to post
Share on other sites

Bump

Share this post


Link to post
Share on other sites

bump again

Share this post


Link to post
Share on other sites

The last 4 posts are yours, this thread either dies now, or you try to provide an example of what you are wanting to do (Application example so it can be re-created)... Because it's obvious that either A.) No one knows how to do it, or B.) You can't explain it well enough for anyone to help you.


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.

Share this post


Link to post
Share on other sites

Here's my code below. It is a parent window with a tiny gui window that is covered by an icon. The icon (child gui) is the child window and whenever I minimize the parent it minimizes the child too.

#Include <GUIConstants.au3>
#Include <Misc.au3>
#include <WindowsConstants.au3>

; Create the GUI

    $hudGUI = GUICreate( "", 150, 250)
    $Icon1 = GUICtrlCreatePic("C:\Documents and Settings\BlueElite1.bmp", 128, 7, 15, 15)
    $exit = GUICtrlCreatePic("C:\Documents and Settings\BlueElite2.bmp", 128, 228, 15, 15)
    GUISetState()
    GUISetBkColor(0xF2F2F2, $hudGUI)
    WinSetOnTop("", "", 1)
    $calling = GUICreate("calling", 24, 24, 7, 5,$WS_POPUP,BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD),$hudGUI)
    $callingpic = GUICtrlCreatePic(@scriptdir & "\icons\calling.gif", 0, 0, 24, 24)
    GUISetState(@SW_SHOW,$calling)
    
    While 1
        $msg = GUIGetMsg()
        ;$picnr = CheckMsgCall($msg) ; Check all Pics for message, get the arraynumber
        Select
        Case $msg = $exit
                GUISetState(@SW_HIDE, $hudGUI)
            Case $msg = $Icon1
                GUIDelete($hudGUI)
                ExitLoop
            Case $msg = $callingpic
            ;Case not ($picnr == false)
                $gp = WinGetPos($calling)
                $mp = MouseGetPos()
                While _IsPressed("1")
                    $cp = MouseGetPos()
                    WinMove($calling, "", $gp[0] - $mp[0] + $cp[0], $gp[1] - $mp[1] + $cp[1])
                    $cPos = WinGetPos($calling)
                    $cPosX = $cPos[0] - 438
                    $cPosY = $cPos[1] - 256
                WEnd
                If Not ($cPosX = "7"  And $cPosY = "-15") Then
                    ReDim $calling[UBound($calling)+1]
                    ReDim $callingpic[UBound($callingpic)+1]
                    $calling[UBound($calling)-1] = GUICreate("calling", 24, 24, 7, -15, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $hudGUI)
                    $callingpic[UBound($callingpic)-1] = GUICtrlCreatePic(@ScriptDir & "\icons\calling.gif", 0, 0, 24, 24); Create new pic
                    GUISetState()
                EndIf
        EndSelect
    WEnd

This script is not even fully working right now but hopefully you get the idea...

Share this post


Link to post
Share on other sites

I can't even run that, try creating an actual running script that demonstrates your problem that others can run, there's so many errors, it's not worth my time to debug them to help you if you can't help us help you.


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.

Share this post


Link to post
Share on other sites

I can't get it working properly. And why do you need it anyway? You have basically the idea of want I want to accomplish. Is it so hard to tell how to minimize in GENERAL and parent window but its child stay open?

Share this post


Link to post
Share on other sites

I can't get it working properly. And why do you need it anyway? You have basically the idea of want I want to accomplish. Is it so hard to tell how to minimize in GENERAL and parent window but its child stay open?

Because I don't feel like taking the time to help you by writing my own!

Dammit, just provide the tools necessary rather than making people go out of their way to show you an example THEY had to write themselves, rather than just fixing your code that you provided that illustrates your problem.


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.

Share this post


Link to post
Share on other sites

Take a chill pill Smoke.

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

Take a chill pill Smoke.

Then don't question those that are willing to help. Edited by SmOke_N

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.

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