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

C#

 
AnswerRe: class c# Pin
PIEBALDconsult30-Apr-10 4:41
mvePIEBALDconsult30-Apr-10 4:41 
GeneralRe: class c# Pin
tek 200930-Apr-10 8:29
tek 200930-Apr-10 8:29 
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 
Try to avoid Application.DoEvents... It's the wrong way to do things in .NET.

What you want is a BackgroundWorker. That's designed specifically for this situation. It goes something like this...

1) Create a BackgroundWorker for the "BusyOperation"
2) Create your progress dialog, and pass the worker to it, either in the constructor or via a property
3) The dialog hooks the RunWorkerCompleted event of the worker (Triggers when it's done), and optionally the progress changed event (See the MSDN documentation)
4) The dialog runs the background worker (Do not sit in a loop - Just exit the method). "BusyOperation" will automatically start asynchronously in a background thread.
5) When the RunWorkerCompleted event triggers, the dialog closes and returns control to the main form.
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels)

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 
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 

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.