NPRao
13th September 2002, 00:03
From the help for start.session(), I see that I can start a session with MODAL or MODELESS.

BUT, when I start a process/print sesions in MODELESS mode, it still behaves as MODAL. The control is transferred to the started program and only when I close it, the control goes back to the calling program. I have tested this in debug.

Anyone has similar experiences, clues/tips how they got around this situation ?

Thanks!

ayoobi
13th September 2002, 04:25
Hi Prashant ,

if this process/print session is always started from another session then a crude workaround would be to change the window type of the the process session to Modeless with Menu instead of dialog. I tried it and it is working but there might issues that u might have to look into depending on ur requirement

Zubair Ayoobi

NPRao
17th September 2002, 07:12
Well, I thought of posting the solution instead of a workaround.

BaaN Support gave me the clues to fix it. :D


long procid

procid = act.and.sleep("zmadm9400m000")
reactivate(procid)
sleep(2000)
kill(procid)


I found that I regained the control even if I was calling the print or process sessions.

During my exploration, I also found some new tools functions which seemed interesting to share with others -

http://www.baanboard.com/programmers_manual_baanerp_help_functions_substitute_sessions_substitute_session

The only issues I notice that the size of the new session's window will be the same as the original session, so if we have big/wide multi-occ/process/print sessions, they look like chopped windows. This will be useful if we have 2 sessions of similar size and we like a superimposition of one over the other. :cool: