c# - Create an user-control from another thread -


i wish create button ( made me user-control ) thread other 1 wish create on . thing know how modify user-control object thread ( using delegate , .invokerequired ) don't know how create 1 . suggestions ?

try following:

// other thread  usercontrol11.begininvoke(new action(() => {     var button = new button();      button.text = "my new button";      usercontrol11.controls.add(button); })); 

within delegate (the () => { }), can user control , form.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -