R
Rick
Hi,
I have an application at work that I've inherited from a former employee.
This app runs on a Windows CE .NET environment on an LCD screen.
The app has several buttons on the screen that
are clickable and have event handlers. These work fine. What I did was set
up a UDP link from a PC to the CE device and I want to send commands from my
PC instead of clicking the button on the device. This doesn't work very
well. It works if the action does not affect the display such as testing
LEDs on the device. If I have operations that remove buttons from the screen
and make others appear, the buttons appear to be dead. For example my form
gave me this event hander for the button which works well.
this.m_oCalibrateLCDBtn.Click += new
System.EventHandler(this.CalibrateLCD_Click);
When I receive the remote command from my PC I try to do a similar thing
which isn't working.
CalibrateLCD_Click(this.m_oCalibrateLCDBtn, dummyEventArgs);
I must be missing something from the form that the event handler has but I
don't know what it is. Some other points are: Other remote UDP command are
OK as long as the display is not affected. Once I'm in the
CalibrateLCD_Click() event handler my sender and "this" look OK in my
"Autos" window in both cases. My EventArgs is empty which is why I was able
to create a dummy. However once I start some operations that affect the
display (removing buttons such as setting enabled and visible to false) my
sender and my "this" get clobbered in my "Autos" window. It says "undefined
value". If I try to debug this with breakpoints things get even more messed
up. I had better luck with MessageBox(es) to debug but still am not having
any luck. I was told to try the PerformClick() method but this is not
available on
the CE.
If anyone has any ideas on this I would appreciate advice.
Rick
I have an application at work that I've inherited from a former employee.
This app runs on a Windows CE .NET environment on an LCD screen.
The app has several buttons on the screen that
are clickable and have event handlers. These work fine. What I did was set
up a UDP link from a PC to the CE device and I want to send commands from my
PC instead of clicking the button on the device. This doesn't work very
well. It works if the action does not affect the display such as testing
LEDs on the device. If I have operations that remove buttons from the screen
and make others appear, the buttons appear to be dead. For example my form
gave me this event hander for the button which works well.
this.m_oCalibrateLCDBtn.Click += new
System.EventHandler(this.CalibrateLCD_Click);
When I receive the remote command from my PC I try to do a similar thing
which isn't working.
CalibrateLCD_Click(this.m_oCalibrateLCDBtn, dummyEventArgs);
I must be missing something from the form that the event handler has but I
don't know what it is. Some other points are: Other remote UDP command are
OK as long as the display is not affected. Once I'm in the
CalibrateLCD_Click() event handler my sender and "this" look OK in my
"Autos" window in both cases. My EventArgs is empty which is why I was able
to create a dummy. However once I start some operations that affect the
display (removing buttons such as setting enabled and visible to false) my
sender and my "this" get clobbered in my "Autos" window. It says "undefined
value". If I try to debug this with breakpoints things get even more messed
up. I had better luck with MessageBox(es) to debug but still am not having
any luck. I was told to try the PerformClick() method but this is not
available on
the CE.
If anyone has any ideas on this I would appreciate advice.
Rick