How I can get parent window name ?
Moderator: Rathinagiri
How I can get parent window name ?
I use one function in many places in many windows. And need know parent window name something like ThisWindow.name
Could somebody help me.
Regards
Fugazi
Could somebody help me.
Regards
Fugazi
- danielmaximiliano
- Posts: 2612
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: How I can get parent window name ?
Try
Parent Property :
Specifies the parent window name for a GUI object
Syntax: Parent <ParentWindowName>
Parent Property :
Specifies the parent window name for a GUI object
Syntax: Parent <ParentWindowName>
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Re: How I can get parent window name ?
Hi all
I wish get parent window name in my generic function.
Like this in Javascript
In Javascript, the "opener" word replace this parent window name.
How to do this in HMG ?
Thanks all.
This code define a parent window to my control.danielmaximiliano wrote: ↑Mon Mar 11, 2013 3:54 pm Try
Parent Property :
Specifies the parent window name for a GUI object
Syntax: Parent <ParentWindowName>
I wish get parent window name in my generic function.
Like this in Javascript
Code: Select all
// Open a new window
var myWindow = window.open("", "myWindow", "width=200, height=100");
// Write some text in the new window
myWindow.document.write("<p>This is 'myWindow'</p>");
// Write some text in the window that created the new window
myWindow.opener.document.write("<p>This is the source window!</p>");
How to do this in HMG ?
Thanks all.
Re: How I can get parent window name ?
I found this solution.
Before open my window in generic function, get actual window name
Before open my window in generic function, get actual window name
Code: Select all
Function Search()
Local cParent := ThisWindow.Name // <<<<------ Get window name before open new window
Load Window Search
blah blah blah blah
- AUGE_OHR
- Posts: 2065
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: How I can get parent window name ?
hi,
Java Script is OOP Style.
when use Function i recommend to use Parameter
Java Script is OOP Style.
when use Function i recommend to use Parameter
Code: Select all
Search( ThisWindow.Name )
Function Search(cWindowName)
have fun
Jimmy
Jimmy
Re: How I can get parent window name ?
You can use:
Theo
Code: Select all
Function ShowParentName()
LOCAL hWnd := GetActiveWindow(), hWndParent := GetParent(hWnd), cWindowName
GetFormNameByHandle (hWndParent, @cWindowName)
MsgDebug(cWindowName)
Return (cWindowName)
Re: How I can get parent window name ?
Thanks Theo, this function works perfectly.
This conditions below must be true:
(1) This function must be called after window activate (not only window load)
(2) Window type must be CHILD, not STANDARD.
See little example attached
This conditions below must be true:
(1) This function must be called after window activate (not only window load)
(2) Window type must be CHILD, not STANDARD.
See little example attached
Re: How I can get parent window name ?
Also refer / visit
https://www.hmgforum.com/viewtopic.php? ... sed#p60159
https://www.hmgforum.com/viewtopic.php? ... sed#p60159
BPD
Convert Dream into Reality through HMG
Convert Dream into Reality through HMG