G
Gina_Marano
Good day,
I thought I had a nifty idea but am hitting walls and looking for best
way to implement.
I am creating a telnet server that mimics a visual form and main menu.
Works very well so far...
for example if there are 9 menu items I display them when the telnet
session connects.
Next step, when they press 1 I want to execute the onclick event for
menu item 1. Have that coded, not as nicely as I wanted. currently
using PerformClick. I generically wanted to call it and pass args but
can't figure that part out as I don't know (since this is generic) the
actual event name. (any hints here would be nice but currently just
setting public variables).
ok, so each session is its own thread. The thread creates its own copy
of the menu form. My attempt to be thread safe. So if everyone is
using menuitem 1 I don't have critical sections etc.
Problem is that when i call performclick I get "Control '' accessed
from a thread other than the thread it was created on". I think this
is probably only in the IDE if my memory is correct.
Thoughts on how to better implement this?
(Why am I doing it this way? Because currently we have about 25-30
menu/sub items and 5000+ lines of code to manage the state etc... If
we can visually create the menu/sub menus and their events it is very
easy to add/disable/hide menu items and look at the function each one
provides)
~Gina_M~
I thought I had a nifty idea but am hitting walls and looking for best
way to implement.
I am creating a telnet server that mimics a visual form and main menu.
Works very well so far...
for example if there are 9 menu items I display them when the telnet
session connects.
Next step, when they press 1 I want to execute the onclick event for
menu item 1. Have that coded, not as nicely as I wanted. currently
using PerformClick. I generically wanted to call it and pass args but
can't figure that part out as I don't know (since this is generic) the
actual event name. (any hints here would be nice but currently just
setting public variables).
ok, so each session is its own thread. The thread creates its own copy
of the menu form. My attempt to be thread safe. So if everyone is
using menuitem 1 I don't have critical sections etc.
Problem is that when i call performclick I get "Control '' accessed
from a thread other than the thread it was created on". I think this
is probably only in the IDE if my memory is correct.
Thoughts on how to better implement this?
(Why am I doing it this way? Because currently we have about 25-30
menu/sub items and 5000+ lines of code to manage the state etc... If
we can visually create the menu/sub menus and their events it is very
easy to add/disable/hide menu items and look at the function each one
provides)
~Gina_M~