Click here to Skip to main content
15,867,308 members
Home / Discussions / C#
   

C#

 
QuestionAccessing CANdb Database file in C# Pin
Niungareamit7-Sep-10 18:46
Niungareamit7-Sep-10 18:46 
AnswerRe: Accessing CANdb Database file in C# Pin
SeMartens8-Sep-10 0:09
SeMartens8-Sep-10 0:09 
AnswerRe: Accessing CANdb Database file in C# Pin
Dave Kreskowiak8-Sep-10 3:56
mveDave Kreskowiak8-Sep-10 3:56 
QuestionCase for .net remoting Pin
faheemnadeem7-Sep-10 15:45
faheemnadeem7-Sep-10 15:45 
AnswerRe: Case for .net remoting Pin
brunoseixas9-Sep-10 9:40
brunoseixas9-Sep-10 9:40 
QuestionDoEvents() and System.Threading.Timer Pin
Keith Vitali7-Sep-10 13:16
Keith Vitali7-Sep-10 13:16 
AnswerRe: DoEvents() and System.Threading.Timer Pin
Keith Vitali7-Sep-10 13:45
Keith Vitali7-Sep-10 13:45 
AnswerRe: DoEvents() and System.Threading.Timer Pin
Luc Pattyn7-Sep-10 14:20
sitebuilderLuc Pattyn7-Sep-10 14:20 
That is not right at all.

1.
All asynchronous events get handled by one or more different threads, never by the main (aka GUI) thread. See here[^]. And such thread cannot help the GUI.

2.
Application.DoEvents() is evil. There is hardly any situation where its use is justified.

3.
What you need to do is keep the main thread free, which means never let it execute anything that takes (or potentially could take) more than some 20 msec. Everything that takes longer, or has to wait, or could get delayed, should be handled by a separate thread (a Thread, a ThreadPool thread, a BackgroundWorker).

4.
And when such thread needs to touch the GUI, use the InvokeRequired/Invoke pattern. See here[^].

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


GeneralRe: DoEvents() and System.Threading.Timer Pin
Keith Vitali8-Sep-10 0:34
Keith Vitali8-Sep-10 0:34 
GeneralRe: DoEvents() and System.Threading.Timer Pin
Luc Pattyn8-Sep-10 0:45
sitebuilderLuc Pattyn8-Sep-10 0:45 
QuestionWould like a blank string as default vaule for a combo box that is bound Pin
BraveKnightFSJ7-Sep-10 9:44
BraveKnightFSJ7-Sep-10 9:44 
AnswerRe: Would like a blank string as default vaule for a combo box that is bound Pin
Pete O'Hanlon7-Sep-10 12:23
subeditorPete O'Hanlon7-Sep-10 12:23 
GeneralRe: Would like a blank string as default vaule for a combo box that is bound Pin
BraveKnightFSJ7-Sep-10 12:41
BraveKnightFSJ7-Sep-10 12:41 
GeneralRe: Would like a blank string as default vaule for a combo box that is bound Pin
Pete O'Hanlon7-Sep-10 12:45
subeditorPete O'Hanlon7-Sep-10 12:45 
QuestionSorting a somewhat unknown list of properties Pin
MollyTheCoder7-Sep-10 4:25
MollyTheCoder7-Sep-10 4:25 
AnswerRe: Sorting a somewhat unknown list of properties Pin
Ian Shlasko7-Sep-10 5:50
Ian Shlasko7-Sep-10 5:50 
GeneralRe: Sorting a somewhat unknown list of properties Pin
MollyTheCoder7-Sep-10 6:43
MollyTheCoder7-Sep-10 6:43 
GeneralRe: Sorting a somewhat unknown list of properties Pin
Ian Shlasko7-Sep-10 7:36
Ian Shlasko7-Sep-10 7:36 
GeneralRe: Sorting a somewhat unknown list of properties Pin
MollyTheCoder7-Sep-10 11:15
MollyTheCoder7-Sep-10 11:15 
GeneralRe: Sorting a somewhat unknown list of properties Pin
Ian Shlasko7-Sep-10 11:45
Ian Shlasko7-Sep-10 11:45 
GeneralRe: Sorting a somewhat unknown list of properties Pin
AspDotNetDev7-Sep-10 13:12
protectorAspDotNetDev7-Sep-10 13:12 
QuestionHow to print in Windows CE Pin
Medo-I7-Sep-10 3:55
Medo-I7-Sep-10 3:55 
AnswerRe: How to print in Windows CE Pin
OriginalGriff7-Sep-10 5:29
mveOriginalGriff7-Sep-10 5:29 
QuestionCreate a virtual Directory in IIS.. Pin
Gourav Vishnoi7-Sep-10 2:54
Gourav Vishnoi7-Sep-10 2:54 
AnswerRe: Create a virtual Directory in IIS.. Pin
Blue_Boy7-Sep-10 2:57
Blue_Boy7-Sep-10 2:57 

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.