Click here to Skip to main content
15,915,324 members
Home / Discussions / C#
   

C#

 
GeneralRe: class c# Pin
PIEBALDconsult30-Apr-10 8:44
mvePIEBALDconsult30-Apr-10 8:44 
GeneralRe: class c# Pin
tek 200930-Apr-10 8:53
tek 200930-Apr-10 8:53 
GeneralRe: class c# Pin
PIEBALDconsult30-Apr-10 9:28
mvePIEBALDconsult30-Apr-10 9:28 
AnswerRe: class c# Pin
Peace ON30-Apr-10 19:42
Peace ON30-Apr-10 19:42 
QuestionIssue with opening multiple form using delegate.BeginInvoke()...new form get hanged...Plz help Pin
Chintan.Desai30-Apr-10 3:16
Chintan.Desai30-Apr-10 3:16 
AnswerRe: Issue with opening multiple form using delegate.BeginInvoke()...new form get hanged...Plz help Pin
Ian Shlasko30-Apr-10 3:27
Ian Shlasko30-Apr-10 3:27 
GeneralRe: Issue with opening multiple form using delegate.BeginInvoke()...new form get hanged...Plz help Pin
Chintan.Desai2-May-10 23:27
Chintan.Desai2-May-10 23:27 
GeneralRe: Issue with opening multiple form using delegate.BeginInvoke()...new form get hanged...Plz help Pin
Ian Shlasko3-May-10 1:56
Ian Shlasko3-May-10 1:56 
You're a little confused here... Don't worry, the threading is a little hard at first. There are two things to consider here...

1) The GUI thread has to stay unblocked, or your progress bar won't update
2) All controls HAVE to be created on the GUI thread, and only modified on that thread (Otherwise you get those crashes).

You're having problems because you're accessing the form inside the background worker... Can't do that. The point of the worker is that it works completely independently of the GUI, just letting you know when to update the progress.

So try creating the background worker from inside the Form2 constructor, then just call Form2's ShowDialog() from the main form.

public Form2()
{
  BackgroundWorker bw = new BackgroundWorker();
  bw.DoWork += BusyOperation;
  bw.RunWorkerAsync();
}


Or something like that.
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels)

AnswerRe: Issue with opening multiple form using delegate.BeginInvoke()...new form get hanged...Plz help Pin
#realJSOP30-Apr-10 9:59
professional#realJSOP30-Apr-10 9:59 
QuestionserialPort Pin
jashimu30-Apr-10 3:07
jashimu30-Apr-10 3:07 
AnswerRe: serialPort Pin
OriginalGriff30-Apr-10 3:17
mveOriginalGriff30-Apr-10 3:17 
GeneralRe: serialPort Pin
jashimu30-Apr-10 3:37
jashimu30-Apr-10 3:37 
GeneralRe: serialPort Pin
OriginalGriff30-Apr-10 3:42
mveOriginalGriff30-Apr-10 3:42 
GeneralRe: serialPort Pin
jashimu30-Apr-10 4:41
jashimu30-Apr-10 4:41 
AnswerRe: serialPort Pin
Luc Pattyn30-Apr-10 5:31
sitebuilderLuc Pattyn30-Apr-10 5:31 
QuestionHow to create a datagrid in property grid Pin
Sangeetha2330-Apr-10 2:28
Sangeetha2330-Apr-10 2:28 
AnswerRe: How to create a datagrid in property grid Pin
Eddy Vluggen30-Apr-10 5:11
professionalEddy Vluggen30-Apr-10 5:11 
GeneralRe: How to create a datagrid in property grid Pin
Henry Minute30-Apr-10 6:52
Henry Minute30-Apr-10 6:52 
GeneralRe: How to create a datagrid in property grid Pin
Eddy Vluggen30-Apr-10 7:43
professionalEddy Vluggen30-Apr-10 7:43 
GeneralRe: How to create a datagrid in property grid Pin
Sangeetha232-May-10 18:17
Sangeetha232-May-10 18:17 
GeneralRe: How to create a datagrid in property grid Pin
Sangeetha232-May-10 19:29
Sangeetha232-May-10 19:29 
GeneralRe: How to create a datagrid in property grid Pin
Henry Minute3-May-10 3:15
Henry Minute3-May-10 3:15 
QuestionString formatting? Pin
Dirk C De Winnaar30-Apr-10 2:03
Dirk C De Winnaar30-Apr-10 2:03 
AnswerRe: String formatting? [modified] Pin
Luc Pattyn30-Apr-10 2:33
sitebuilderLuc Pattyn30-Apr-10 2:33 
GeneralRe: String formatting? Pin
Not Active30-Apr-10 2:51
mentorNot Active30-Apr-10 2:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.