How can i uniquely identify a Control ? (No control.name property?)

  • Thread starter Thread starter Sai
  • Start date Start date
S

Sai

Hi all,

I am trying to write a desktop app which when given a DLL full of forms for
compact framework will look at each form and control through reflection and
auto-generate some code. However, I need to uniquely identify each control
when I use the auto-generated code on the pocket pc and I cannot tie the
code back to the control because the control.name property is not available.
How can i uniquely identify a control at runtime on the pocket pc without
using the control.name property ?

Thanks

Sai
 
I had the same issue - only solution I could find was to inherit from the
control and add a property to denote a unique identifier for the control
(e.g. Tag, ControlName, etc.).

Joe
 
Sai said:
Hi all,

I am trying to write a desktop app which when given a DLL full of forms for
compact framework will look at each form and control through reflection and
auto-generate some code. However, I need to uniquely identify each control
when I use the auto-generated code on the pocket pc and I cannot tie the
code back to the control because the control.name property is not available.
How can i uniquely identify a control at runtime on the pocket pc without
using the control.name property ?

Thanks

Sai

We do something similar:

We can "identify" a control by its size(x,y) and location(x,y) and the
size and location of its parent control.

This only poses a problem if we have two controls that have identical
size and location properties on the same parent (happens for us in the
case of a couple detail panels on one of our forms). We just bump the
size one extra pizel to handle the problem.

-a
 
Back
Top