c# - Control not visible even ctrl.Visible = true -


i use following code (c#, net4) update visibility of label (its not visible):

task.factory.startnew(() =>             {                 this.begininvoke(new action(() =>                 {                     lbnumberimages.visible = true;                 }));             }).         continuewith             ((task) =>                 {                     try                     {                         task.wait();                     }                     catch (aggregateexception ae)                     {                         messagebox.show(ae.innerexception.message);                         }));                     }                 }); 

if form visible label gets visible. if form not visible label remains hidden when form gets visible. wrong code?

the code called - if set breakpoint on line 'lbnumberimages.visible = true;' debugger stops.


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -