Hi,
Do this, put the declaration of the cntrols in a separate #region ( Just for
organization, not really needed ) , then go to the InitializateComponent and
cut all the lines where these controls are used and paste it in the
constructor AFTER the call to InitializateComponent() , in this way the
designer will not overwrite them , if you have more than one constructor you
should create a separate method instead.
Cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Dhanraj K" <dh*******@hotmail.com> wrote in message
news:uI**************@TK2MSFTNGP09.phx.gbl...
hi,
i have some controls in a form which are declared as static
for example :-
public static System.Windows.Forms.ComboBox comboBox1;
it is working fine and i am able to access the control from other forms
without creating an object of it. But when i make any changes in the form
like adding another control, the access modifier is disappearing.
i.e. my code becomes
public System.Windows.Forms.ComboBox comboBox1;
can anybody tell why this is happening and a solution
Thanking You