on 05-19-2006 11:31 AM
Hi all
problem:I want to know how to get the forefront form, when its lost focus.
Some forms are opening, and these forms are same formtype.
focus change to mainmenu and lost focus.
Then, How to get the forefront form's count through ui-api.
Hi Koji,
The application.forms.count gives you the number of open form and the application.forms.activeform gives you the active form.
Regards
Ad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ad,
Thank you.
Sorry, I had to write more detail.
This problem concerned my addon.
My making Addon launch from MainMenu, my addon will make to dispose to forefront form.
I tried below.
using "application.forms.activeform"
When user launch addon from Mainmenu, Then mainmenu has focus yet. Then, in the addon
logic, "application.forms.activeform ".
It has value of "MainMenu"ID.not have forefront FormUID.
using "The application.forms.count"
"The application.forms.count" has launch order.
I think that it is not front order.
I'm sorry, I can't express that well.
Hi Ad
sample code below:Now I'm trying.
scene:Some Delivery Document in SBO Desktop.
And my addon program loaded at mainmenu.
for example
Process 1.my addon starts up from MainMenu Window.
in my addon program's code below
This Code runs "SBO_Application_MenuEvent"
oForm = SBO_Application.Forms.ActiveForm
strTitle = oForm.Title()
strFormUID = oForm.UniqueID
getting value
strTitle="Main Menu"
strFormUID="F_22"
Process 2.my addon starts up from Modules Menu.
same code Process 1
getting value
strTitle="Delivery"
strFormUID="F_25"
I want to know how to get forefront Delivery form's UID by the Process1.
Hi Koji,
I understand your question now.
If you start a form from the menu-form the menu-form is the active form and you want to know what was the active form, before the menu form became the active form.
I think here are not many options. I think you must set a global variable in your application that holds the active formUID. Everytime a form is activiated, you have to catch this event and set your global variable except when the menuform comes active.
I hope this will solve your problem.
Regards
Ad
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.