Skip to Content
avatar image
Former Member

UI: Handle print-event / form deactivate does not always work

I'm trying to catch a print-event: the user should be able to use the standard SBO-print icon and my add-in should be able to determine what screen the user is in and process the corresponding code. Catching the event is no problem, determining what to do next is.

In my specific case the user has word-files that should be created extra on a order-print and on a quotation-print.

I don't know how to determine the active screen. My current work-around is using the activate/deactivate events of the order/quotation forms and a global var that tells me what screen (eg. "F_22") is active, but this is simply not reliable. Sometimes an activate event will not fire and sometimes a deactivate event will not fire.

Is there any other option?

Any ideas?

BTW: version 6.50.52 ef:14

and VB6 on Win2k

Message was edited by: Jacques Biermans

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jun 02, 2004 at 12:17 PM

    There is a "selected" property on the Form object that is set when a form has the focus. By looping through the Forms collection checking this property on each form you can determine the currently active screen.

    Regards,

    John.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 02, 2004 at 01:00 PM

    Thank you, John!

    This works exactly like it should (and takes less events to filter too).

    Thanks and regards,

    Jacques

    Add comment
    10|10000 characters needed characters exceeded