Click here to Skip to main content
15,903,030 members
Home / Discussions / C#
   

C#

 
AnswerRe: PInvoke registry value - Help please. Pin
Luc Pattyn12-Nov-11 4:35
sitebuilderLuc Pattyn12-Nov-11 4:35 
AnswerRe: PInvoke registry value - Help please. Pin
biop.codeproject13-Nov-11 15:05
biop.codeproject13-Nov-11 15:05 
GeneralRe: PInvoke registry value - Help please. Pin
CCodeNewbie13-Nov-11 22:14
CCodeNewbie13-Nov-11 22:14 
QuestionForm.Show() in a backgroundworker doesn't work Pin
teknolog12311-Nov-11 22:41
teknolog12311-Nov-11 22:41 
AnswerRe: Form.Show() in a backgroundworker doesn't work Pin
Richard MacCutchan11-Nov-11 22:53
mveRichard MacCutchan11-Nov-11 22:53 
GeneralRe: Form.Show() in a backgroundworker doesn't work Pin
teknolog12311-Nov-11 23:48
teknolog12311-Nov-11 23:48 
AnswerRe: Form.Show() in a backgroundworker doesn't work Pin
Luc Pattyn12-Nov-11 1:56
sitebuilderLuc Pattyn12-Nov-11 1:56 
AnswerRe: Form.Show() in a backgroundworker doesn't work Pin
BobJanova13-Nov-11 22:45
BobJanova13-Nov-11 22:45 
On a technical level, you need to marshal this into the UI thread, as the others said. (The reason it's hanging is because there is no message loop in that thread.) But if you find yourself doing that there's a good chance that your design is in need of revision; you shouldn't generally be doing direct updates of the UI from a worker thread anyway, even if it did work correctly. Almost by definition, a background thread is business logic, and you should always keep that separate from UI.

A better solution is to have your background worker signal events (either the built in progress event or new events that you define), and have the UI hook onto them and update itself. Note that these events are dispatched in the context of the background thread so you need to use Invoke or BeginInvoke in the handlers to update the UI.
QuestionWinForms - Scroll Panel On Mouse Wheel Pin
Matt U.11-Nov-11 14:27
Matt U.11-Nov-11 14:27 
AnswerRe: WinForms - Scroll Panel On Mouse Wheel Pin
BillWoodruff11-Nov-11 15:54
professionalBillWoodruff11-Nov-11 15:54 
GeneralRe: WinForms - Scroll Panel On Mouse Wheel Pin
Matt U.11-Nov-11 16:10
Matt U.11-Nov-11 16:10 
AnswerRe: WinForms - Scroll Panel On Mouse Wheel Pin
OriginalGriff11-Nov-11 21:51
mveOriginalGriff11-Nov-11 21:51 
GeneralRe: WinForms - Scroll Panel On Mouse Wheel Pin
Matt U.12-Nov-11 1:43
Matt U.12-Nov-11 1:43 
QuestionAnyone know how to programmatically change the datatype on a column in an Excel worksheet? Pin
Alaric_11-Nov-11 7:22
professionalAlaric_11-Nov-11 7:22 
AnswerRe: Anyone know how to programmatically change the datatype on a column in an Excel worksheet? Pin
Wayne Gaylard11-Nov-11 7:33
professionalWayne Gaylard11-Nov-11 7:33 
GeneralRe: Anyone know how to programmatically change the datatype on a column in an Excel worksheet? Pin
Alaric_11-Nov-11 8:12
professionalAlaric_11-Nov-11 8:12 
GeneralRe: Anyone know how to programmatically change the datatype on a column in an Excel worksheet? Pin
Wayne Gaylard11-Nov-11 8:26
professionalWayne Gaylard11-Nov-11 8:26 
GeneralRe: Anyone know how to programmatically change the datatype on a column in an Excel worksheet? Pin
Alaric_11-Nov-11 8:31
professionalAlaric_11-Nov-11 8:31 
GeneralRe: Anyone know how to programmatically change the datatype on a column in an Excel worksheet? Pin
Alaric_11-Nov-11 8:40
professionalAlaric_11-Nov-11 8:40 
GeneralRe: Anyone know how to programmatically change the datatype on a column in an Excel worksheet? Pin
Wayne Gaylard11-Nov-11 8:49
professionalWayne Gaylard11-Nov-11 8:49 
GeneralRe: Anyone know how to programmatically change the datatype on a column in an Excel worksheet? Pin
Alaric_11-Nov-11 10:40
professionalAlaric_11-Nov-11 10:40 
QuestionArgumentException Pin
si_6911-Nov-11 5:39
si_6911-Nov-11 5:39 
AnswerRe: ArgumentException Pin
SledgeHammer0111-Nov-11 7:09
SledgeHammer0111-Nov-11 7:09 
GeneralRe: ArgumentException Pin
AspDotNetDev11-Nov-11 7:34
protectorAspDotNetDev11-Nov-11 7:34 
GeneralRe: ArgumentException Pin
SledgeHammer0111-Nov-11 7:47
SledgeHammer0111-Nov-11 7:47 

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.