A unique way to identify different windows?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hey,

I am working on a project which requires me to store different data for
different windows (can be browser or non-browser window) and to be able to
retrive corresponding data when meet the window again.

For example, a prompt accepting userid/password input. The project needs to
store the userid/password and next time when the SAME prompt comes out, the
project should be able to recognize it and get the userid/password from
database for it.

My question is: what's the best way to index the data? The original idea is
using the caption of the window. But this idea is not very satisfying since
many prompts contain very simple and same captions like "password".

Thanks.
 
You could use a DataTable for instance, and have it as a static property.
You can set the PrimaryKey equal to the Form's caption and then store the
rest of the info in corresponding datacolumns - you can even encrypt it.
From there, you can check against the datatable and if it matches, then you
have your values.
 
Back
Top