no there isn't...
but you can make it several ways:
make new table: (FormID, Counts)
in your form:OnOpen you just read the record fro new table, increase counts
On Forms OnClose you read again and decrease number.
you can use locking and comitting to ensure correct counts...
you can also make it without new table by using singleinstance codeunit,
On open form you try to run this codeunit (if it isn't already runing) and then you just increase some counter variable...
Form:OnClose you decrease counter...
Yeah, well too be honest if we have to take in account that abnormal errors can occur i think every sollution you try will not be suitable in some way.
You can always build a monitoring tool wich scans all the window handles below "Fin.exe". But you will only be able to get the window captions with that, no object ID.
In a world without Borders or Fences, who needs Windows and Gates?
add a filed userid, so you have <userid><formid><count>.
when updating counter for a user on OnOpen form, you can allways run a function that checks if some user is not conected (crashed) and you fix his count (delete rec for userid's that are not conected)
add a filed userid, so you have <userid><formid><count>.
when updating counter for a user on OnOpen form, you can allways run a function that checks if some user is not conected (crashed) and you fix his count (delete rec for userid's that are not conected)
it is not perfect, but...
good idea, i wrote this function before you say to do it 8)
but i run it from LogInStart function in the Codeunit 1
Comments
but you can make it several ways:
make new table: (FormID, Counts)
in your form:OnOpen you just read the record fro new table, increase counts
On Forms OnClose you read again and decrease number.
you can use locking and comitting to ensure correct counts...
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
On open form you try to run this codeunit (if it isn't already runing) and then you just increase some counter variable...
Form:OnClose you decrease counter...
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
RobertMo, in case of abnormal error OnClose trigger will not run.
So, we will have wrong data in our new table. It`s unsuitable for me.
You can always build a monitoring tool wich scans all the window handles below "Fin.exe". But you will only be able to get the window captions with that, no object ID.
when updating counter for a user on OnOpen form, you can allways run a function that checks if some user is not conected (crashed) and you fix his count (delete rec for userid's that are not conected)
it is not perfect, but...
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
believe me user we'll be happy too
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
good idea, i wrote this function before you say to do it 8)
but i run it from LogInStart function in the Codeunit 1