Jump to content
Sign in to follow this  
dragan

How do I make parent window active at the same time as child

Recommended Posts

dragan

I have this code:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$hGUI = GUICreate("Parent", 500, 500)
GUISetState()
$hGUI_No_TaskBar_1 = GUICreate("Child", 200, 200, 150, 100, -1, $WS_EX_MDICHILD, $hGUI)
GUISetState()
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE

so.. how do I make my parent window active while I'm using child window (or is that even possible)? I don't want parent window to loose focus when I'm using child window's controls.

Share this post


Link to post
Share on other sites
kaotkbliss

you cannot have 2 windows active at the same time. You can, however controlsend/controlclick in one window while working in the other (at least I believe you can)

Edited by kaotkbliss

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites
MvGulik

@OP

Seems to me like your asking for a inconsistent window-focus behavior. Especially in relation to the parent-child state in this case.

Why would you like this behavior in the first place?


"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Share this post


Link to post
Share on other sites
dragan

I'm trying to create a control using child window and post onto parent window so it seems like the control belongs to parent, but soon as I click on child's control parent loose focus and it's not "pretty" anymore.

I'll go with the kaotkbliss's solution, to show and disable child window, and use GUIGetCursorInfo() from child's window control to detect whether it was clicked or not. Tnx

Share this post


Link to post
Share on other sites
Hawkwing

01001110011010010110001101100101001000000111001101101001011001110010000001111001011011110111010100100000

01100111011011110111010000100000011101000110100001100101011100100110010100100000011010110110000101101111

01110100011010110110001001101100011010010111001101110011001011000010000001001001001000000110110001101001

01101011011001010010000001101001011101000010111000100000010000110110000101110101011100110110010101100100

00100000011011010110010100100000011101000110111100100000011101110111001001101001011101000110010100100000

01000010011010010110111001100001011100100111100101010100011011110100000101110011011000110110100101101001

00100000011000010110111001100100001000000100000101110011011000110110100101101001010101000110111101000010

01101001011011100110000101110010011110010010000001010000011110010111010001101000011011110110111000100000

011001100111010101101110011000110111010001101001011011110110111001110011001000000011101000101001

Edited by Hawkwing

The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again.

Share this post


Link to post
Share on other sites
MvGulik

01001110011010010110001101100101001000000111001101101001011001110010000001111001011011110111010100100000

01100111011011110111010000100000011101000110100001100101011100100110010100100000011010110110000101101111

01110100011010110110001001101100011010010111001101110011001011000010000001001001001000000110110001101001

01101011011001010010000001101001011101000010111000100000010000110110000101110101011100110110010101100100

00100000011011010110010100100000011101000110111100100000011101110111001001101001011101000110010100100000

01000010011010010110111001100001011100100111100101010100011011110100000101110011011000110110100101101001

00100000011000010110111001100100001000000100000101110011011000110110100101101001010101000110111101000010

01101001011011100110000101110010011110010010000001010000011110010111010001101000011011110110111000100000

011001100111010101101110011000110111010001101001011011110110111001110011001000000011101000101001

:)

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Share this post


Link to post
Share on other sites
kaotkbliss

01001110011010010110001101100101001000000111001101101001011001110010000001111001011011110111010100100000

01100111011011110111010000100000011101000110100001100101011100100110010100100000011010110110000101101111

01110100011010110110001001101100011010010111001101110011001011000010000001001001001000000110110001101001

01101011011001010010000001101001011101000010111000100000010000110110000101110101011100110110010101100100

00100000011011010110010100100000011101000110111100100000011101110111001001101001011101000110010100100000

01000010011010010110111001100001011100100111100101010100011011110100000101110011011000110110100101101001

00100000011000010110111001100100001000000100000101110011011000110110100101101001010101000110111101000010

01101001011011100110000101110010011110010010000001010000011110010111010001101000011011110110111000100000

011001100111010101101110011000110111010001101001011011110110111001110011001000000011101000101001

01001100 01001111 01001100 00100000 01110111 01101000 01111001 00100000 01110100 01101000 01100001 01101110 01101011 00100000 01111001 01101111 01110101 00100000 01001000 01100001 01110111 01101011 01110111 01101001 01101110 01100111 00101110 00100000 01001001 00100000 01110100 01101000 01101111 01110101 01100111 01101000 01110100 00100000 01101001 01110100 00100000 01110111 01101111 01110101 01101100 01100100 00100000 01100010 01100101 00100000 01101000 01110101 01101101 01101111 01110010 01101111 01110101 01110011 00100000 01100001 01101110 01100100 00100000 01100110 01101001 01110100 01110100 01101001 01101110 01100111 00100000 01100110 01101111 01110010 00100000 01110100 01101000 01101001 01110011 00100000 01100110 01101111 01110010 01110101 01101101 00101110 00100000 00111010 01010000

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites
Melba23

Hi,

01001111 01100110 00100000 01100011 01101111 01110101 01110010 01110011 01100101 00100000 01111001 01101111 01110101 00100000 01101011 01101110 01101111 01110111 00100000 01110100 01101000 01100101 00100000 01101111 01101100 01100100 00100000 01101010 01101111 01101011 01100101 00111010 00100000 01010100 01101000 01100101 01110010 01100101 00100000 01100001 01110010 01100101 00100000 01101111 01101110 01101100 01111001 00100000 00110001 00110000 00100000 01110100 01111001 01110000 01100101 01110011 00100000 01101111 01100110 00100000 01110000 01100101 01101111 01110000 01101100 01100101 00101100 00100000 01110100 01101000 01101111 01110011 01100101 00100000 01110111 01101000 01101111 00100000 01110101 01101110 01100100 01100101 01110010 01110011 01110100 01100001 01101110 01100100 00100000 01100010 01101001 01101110 01100001 01110010 01111001 00100000 01100001 01101110 01100100 00100000 01110100 01101000 01101111 01110011 01100101 00100000 01110111 01101000 01101111 00100000 01100100 01101111 00100000 01101110 01101111 01110100 00100001

:)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
MvGulik

Erm ... <puts on Matrix glasses> ... Blee. Old joke indeed. :)


"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Share this post


Link to post
Share on other sites
BrewManNH

++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

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  

×