G
Guest
I have a multi-form app that uses the hard keys and context menus to complete
tasks. When the context menu is used to start a task, there are no problems.
However, if the hard keys are used to start the same task it always has
problems.
In my main form, a thread is started that constantly polls the keys for
changes. The main form also contains a list view. One of the items must be
selected in the list view before any action is performed (via menu or
button). The user must select one of the items in the list view and when a
button (or menu item) is pushed an event is fired from the class that manages
the key polling (in a different thread). The main form hides and passes the
information about the selected item to another class (CommandProcessor) which
sets up another form and displays it. Once the user has completed the
actions on this form and pressed OK or Cancel the result is returned to the
class that created the form. Information is then processed from the result
of the form that was just closed and the result of this process is then
returned to the main form. The main form processes the received information
and then changes the Text property to the correct name. The listview is
updated to reflect any changes from the other form.
This process works fine when the process is begun with the context menu, but
fails by not reloading the main form.
I think it has something to do with the different threads, but I'm not
certain. Has anyone had any experience with this or have any idea what might
be causing the problem?
Thanks
-G
tasks. When the context menu is used to start a task, there are no problems.
However, if the hard keys are used to start the same task it always has
problems.
In my main form, a thread is started that constantly polls the keys for
changes. The main form also contains a list view. One of the items must be
selected in the list view before any action is performed (via menu or
button). The user must select one of the items in the list view and when a
button (or menu item) is pushed an event is fired from the class that manages
the key polling (in a different thread). The main form hides and passes the
information about the selected item to another class (CommandProcessor) which
sets up another form and displays it. Once the user has completed the
actions on this form and pressed OK or Cancel the result is returned to the
class that created the form. Information is then processed from the result
of the form that was just closed and the result of this process is then
returned to the main form. The main form processes the received information
and then changes the Text property to the correct name. The listview is
updated to reflect any changes from the other form.
This process works fine when the process is begun with the context menu, but
fails by not reloading the main form.
I think it has something to do with the different threads, but I'm not
certain. Has anyone had any experience with this or have any idea what might
be causing the problem?
Thanks
-G