I tried to set labe control property visible to true
-
I tried to set the label control property "visble" to true on a form. This i did from networkoperation.cs class which contains a field referring to form object in Form1.cs . I called a function Matrixdisplay of form as form.Matrixdisplay(row,col); This function contains public void Matrixdisplay(int row,int col) { for (i=0;i
-
I tried to set the label control property "visble" to true on a form. This i did from networkoperation.cs class which contains a field referring to form object in Form1.cs . I called a function Matrixdisplay of form as form.Matrixdisplay(row,col); This function contains public void Matrixdisplay(int row,int col) { for (i=0;i
-
There are two classes. One is networkoperation.cs and Form1.cs Networkoperation.cs class contains a reference variable form to Form1 class in Form1.cs I am calling the function of Form1.cs Matrixdisplay() from one of the thread of networkoperation.cs class. like this form.Matrixdisplay(); In this function i implemented the visibility setting code.
-
There are two classes. One is networkoperation.cs and Form1.cs Networkoperation.cs class contains a reference variable form to Form1 class in Form1.cs I am calling the function of Form1.cs Matrixdisplay() from one of the thread of networkoperation.cs class. like this form.Matrixdisplay(); In this function i implemented the visibility setting code.
try this instead of 'form.Matrixdisplay();': delegate void displayMethod(); form.Invoke(new displayMethod(form.Matrixdisplay),null); When interacting with controls from a thread that is not the 'owner' of the controls (thread where they have been created) you ALWAYS have to use the Invoke method. If in some cases you are not really sure if u need to invoke, u can always check the InvokeRequired property of the control (in this case form). P.D: this might not be the issue at all, but without more details of your code, its the best shot I can think of.