Sign in to follow this  
Followers 0
allSystemsGo

Child window behind parent window

9 posts in this topic

Whenever I call my child window, it appears behind the parent. I cannot access the window at all...it appears in my task bar but I am unable to bring it to the front. Any suggestions? Thanks!

Share this post


Link to post
Share on other sites



Use "parent" parameter when you create the second GUI. So the new GUI will become a true child of the parent.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I believe I am doing that...heres a bit of my code...

$main=GuiCreate("Catchy Title",500,300) ;; here is where the main (parent) window is createdGUICtrlCreateLabel("Global Settings",10,20)
GUICtrlCreateLabel("Station Settings",285,20)
$bEditGlobal=GuiCtrlCreateButton("Edit wnos.ini",10,50,100,30)
$bEditMac=GuiCtrlCreateButton("Add New",315,50,100,30)
$bAddMac=GuiCtrlCreateButton("Edit $mac.ini",315,90,100,30)
GUISetState(@SW_SHOW)
;--------GUI is made!------------------------------
;--------Here is where all the action happens------
While 1
$msg=GUIGetMsg()
Select
Case $msg=$GUI_EVENT_CLOSE
ExitLoop
Case $msg=$bEditGlobal;;; Then a bit later I create the child from a While Loop, which calls a separate function
Call(editglobal())
GUISetState(@SW_DISABLE,$main)
GUISetState(@SW_HIDE,$main)


EndSelect
Wend
EndFunc
$aEdit=GuiCreate("wnos.ini",350,500,$main) ;;;this is from the editGlobal() which creates the new GUI window
Edited by allSystemsGo

Share this post


Link to post
Share on other sites

Please check the help file. The parent handle has to be parameter 8.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Got it, thanks.

Share this post


Link to post
Share on other sites

Now it works as desired?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Yes, it appears as it should. I have many more quirks to work out of it though. I am trying to make this part of the script a very simply text editor so that I do not have to call notepad...now trying to get it to be able to save any changes I made.

Share this post


Link to post
Share on other sites

Did you search the forum for simple editors written in AutoIt? Maybe it is not necessary to reinvent the wheel?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

I figured for this purpose it would be pretty simple. Basically just reads the same file into a box every time, and if changes are made a save button would erase the old file with the new. Nothing fancy. But I'll take a look.

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