S
Sean Connery
I have a Microsoft UI Process Application Block that is controlling child
forms in an MDI parent container. The views node in the app.config file has
been set to stayOpen=false.
Because there are a series of data entry forms using ONLY the numeric key
pad, certain keys on this pad have been configured to behave as "function
keys". In order for this to happen, I have implemented the IMessageFilter
interface to intercept messages in the message pump. These are trapped as
virutal methods in the base form to be optionally used by derived child
forms.
Everything works fine... up to a point. If "Data Entry" F2 is selected, the
overridden virutal method in the Data Entry form fires and causes a
navigation to the "Bill Selection" form. UIP closes Data Entry and
intantiantes Bill Selection... Furthermore, the Data Entry base class
Disposes its components.
I expect to do the reverse in Bill Search, switching to Data Entry via the
F1 key this time. Thus, F1/F2 toggle these two views back and forth. Closing
one and opening the other.
This works fine.
The problem is pressing F2 (or F1) twice in a row. Because Data Entry has
been disposed, I DO NOT expect it to trap the F2 event AFTER it has been
disposed. However, this is not the case and I am at a loss as to how this
can be happening (there should be no instance of an F2 listener insofar as
the form listening for it has been disposed.)
Does anyone have any ideas on how this could be possible?
forms in an MDI parent container. The views node in the app.config file has
been set to stayOpen=false.
Because there are a series of data entry forms using ONLY the numeric key
pad, certain keys on this pad have been configured to behave as "function
keys". In order for this to happen, I have implemented the IMessageFilter
interface to intercept messages in the message pump. These are trapped as
virutal methods in the base form to be optionally used by derived child
forms.
Everything works fine... up to a point. If "Data Entry" F2 is selected, the
overridden virutal method in the Data Entry form fires and causes a
navigation to the "Bill Selection" form. UIP closes Data Entry and
intantiantes Bill Selection... Furthermore, the Data Entry base class
Disposes its components.
I expect to do the reverse in Bill Search, switching to Data Entry via the
F1 key this time. Thus, F1/F2 toggle these two views back and forth. Closing
one and opening the other.
This works fine.
The problem is pressing F2 (or F1) twice in a row. Because Data Entry has
been disposed, I DO NOT expect it to trap the F2 event AFTER it has been
disposed. However, this is not the case and I am at a loss as to how this
can be happening (there should be no instance of an F2 listener insofar as
the form listening for it has been disposed.)
Does anyone have any ideas on how this could be possible?