Kingsto88
10th March 2006, 09:46
Dear all,

I am trying to use first.window() and last.window() function, but one argument needed is window id.

I can use current.window() function to get current window id, but how do i get the window id for the parent window.

Basically, i wish to activate find.data of the parent window from the script of zoom/child session.

Hope u all understand.
rgds,

george7a
10th March 2006, 09:56
Hi,

You can use get.window.attrs() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_char_b_win_get_window_attrs) with the pre defined variable "win.parent"

I hope it helps,

- George

Kingsto88
10th March 2006, 09:58
Hi,,

Can you give me an example how to use these functions.

current.window() will give the current window id

win.parent() will give the parent window id, is it???

Appreciate the explanation on how to use the get.window.attrs() function too.



rgds

Kingsto88
13th March 2006, 12:58
Hi George or anyone out there,

Can you give me an example of how to get windows ID of the parent window.

I know how to use the function current.window() to get windows id of current window. But how do i get for the parent window.

thanks and regards,

NPRao
15th March 2006, 02:45
Kingsto88,

I do not access to BaaN-4 environments.

Note - Some of the functions which you are using are Deprecated and are only supported for character-based windows and its usage is therefore deprecated.

Here is a sample code with 2 options for you to try it out -

long proc, curr.winid, curr.winid2, par.winid, par.winid2, info(256)
long attrs(WINMAXSIZE)
string progname(256)

proc = pstat(pid, progname, info)
curr.winid = ps.mwin(info) |* Current Window Id - Option 1
curr.winid2 = current.window() |* Current Window Id - Option 2
proc = pstat(parent, progname, info)
par.winid = ps.mwin(info) |* Parent Window Id - Option 1
proc = get.window.attrs(curr.winid, attrs) |* Parent Window Id - Option 2
par.winid2 = win.parent(attrs)

Good Luck!