S
SammyBar
Hi all,
I'm having troubles with a Symbol 9000 device (Compact Framework v 1.1) when
activating the barcode scanner from a window. The problem is related to the
Activated event of the form which carries the task of the initializing the
scanner. It looks like this event is not called after the creation of one of
the forms. Let me describe shortly the sequence of form creation. The app
first call a browsing form by using ShowDialog(). This browsing form (modal
dialog) calls a data input form that uses the scanner device using
ShowDialog(). It works as expected. On the Activated event it captures the
scanning device and on Deactivate releases it. This forms is also a modal
dialog. From this data input I call a third data input form also by using
ShowDialog(). Note it is the third on the "stack" of called modal dialogs.
The Deactivate event is called for the second form and the scanner is
released, but the Activated event is not called for this third form then the
scanner is not activated. To get the Activated event called I should make a
trick: The three modal dialogs are represented on the taskbar as buttons. I
can click the button of the second form. It is displayed but is blocked for
input. But in this click the Deactivate event is called for the third form
and the Activated is called for the second. Then I click the button on the
taskbar for the third form and voila! the Activated event is called for the
first time for the third form, resulting in the scanner device being
activated. I should note that the handlers for these events are registered
in the Load event handler. The Load event handler is registered on
InitializeComponent as normally it is created from the Visual Studio 2005. I
fear the Activated event is called before the Load when the handler is not
registered yet.
What can be wrong? Which is the sequence of events when using ShowDialog()?
Any hint is welcomed
Thanks in advance
Sammy
I'm having troubles with a Symbol 9000 device (Compact Framework v 1.1) when
activating the barcode scanner from a window. The problem is related to the
Activated event of the form which carries the task of the initializing the
scanner. It looks like this event is not called after the creation of one of
the forms. Let me describe shortly the sequence of form creation. The app
first call a browsing form by using ShowDialog(). This browsing form (modal
dialog) calls a data input form that uses the scanner device using
ShowDialog(). It works as expected. On the Activated event it captures the
scanning device and on Deactivate releases it. This forms is also a modal
dialog. From this data input I call a third data input form also by using
ShowDialog(). Note it is the third on the "stack" of called modal dialogs.
The Deactivate event is called for the second form and the scanner is
released, but the Activated event is not called for this third form then the
scanner is not activated. To get the Activated event called I should make a
trick: The three modal dialogs are represented on the taskbar as buttons. I
can click the button of the second form. It is displayed but is blocked for
input. But in this click the Deactivate event is called for the third form
and the Activated is called for the second. Then I click the button on the
taskbar for the third form and voila! the Activated event is called for the
first time for the third form, resulting in the scanner device being
activated. I should note that the handlers for these events are registered
in the Load event handler. The Load event handler is registered on
InitializeComponent as normally it is created from the Visual Studio 2005. I
fear the Activated event is called before the Load when the handler is not
registered yet.
What can be wrong? Which is the sequence of events when using ShowDialog()?
Any hint is welcomed
Thanks in advance
Sammy