static controls

  • Thread starter Thread starter Nadav
  • Start date Start date
N

Nadav

hello,
I have a form, with some controls I decided to define as static.
Every time I change something in the form's design, InitializeComponent() is
re-written and screws up the static definitions.
If I take the code of these controls out of that function, I don't see them
in the design view of the form and I cant have that.
Is there a way to set them static and also view them in the design view ?
(There's no "Static" in "Modifiers" property of these controls).
btw - it's a listview and a combobox, if that's relevant.
thanks.
 
HI,


Nadav said:
hello,
I have a form, with some controls I decided to define as static.

Why ? I would bet that you cannot do this. a Control is a completely
different beast than a regular class, it does have a hWnd associated and I
bet you are seeing all kind of nasty stuff in your app


Is there a way to set them static and also view them in the design view ?
(There's no "Static" in "Modifiers" property of these controls).
btw - it's a listview and a combobox, if that's relevant.
thanks.

There should be a reason for the not appearance of static right?

Why you want them as static in the first place?

If what you are after is not having to recreate them everytime you load your
form the way to go is making the entiry form as a singleton.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top