Static Form

  • Thread starter Thread starter Franck
  • Start date Start date
F

Franck

I wasn't able to find out how anywhere how to do this, but i need to
have a form loaded at a point and being able to be access with all is
control from anywhere. So i need it to be static and by the same
occasion the control inside of course. How do i do that. I'm sure it
possible if VB6 is able to do that c# should.

I don't want answer like : "Why you want do that ?", it's what i need
for that program section that's it.
 
Franck,

Well, you are going to get questions about why do you want to do that,
because it doesn't make much sense from the information you provided.

Regardless, once you create your form, you can set a static variable to
that form, and then expose it to your application (through a public
property, no doubt).

As for the control on the form, you can set a static variable to that,
or set the visibility of the field with the control (or a public property on
the form which returns the control) to public.
 
I created a Static class which instantiate my form as static and now
it work, i have access to all form control and property from any for
in the project. Like VB6.
 

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