Click here to Skip to main content
15,900,907 members
Home / Discussions / C#
   

C#

 
GeneralRe: RTF - Codes Pin
Charlie Williams19-May-04 17:28
Charlie Williams19-May-04 17:28 
GeneralDataGrid, Generic GDI+ errors, and a Big Red X Pin
inyoursadachine19-May-04 13:30
inyoursadachine19-May-04 13:30 
GeneralRe: DataGrid, Generic GDI+ errors, and a Big Red X Pin
Heath Stewart19-May-04 13:52
protectorHeath Stewart19-May-04 13:52 
GeneralRe: DataGrid, Generic GDI+ errors, and a Big Red X Pin
inyoursadachine19-May-04 14:22
inyoursadachine19-May-04 14:22 
GeneralRe: DataGrid, Generic GDI+ errors, and a Big Red X Pin
Heath Stewart19-May-04 18:28
protectorHeath Stewart19-May-04 18:28 
GeneralRe: DataGrid, Generic GDI+ errors, and a Big Red X Pin
inyoursadachine20-May-04 5:41
inyoursadachine20-May-04 5:41 
GeneralRe: DataGrid, Generic GDI+ errors, and a Big Red X Pin
Heath Stewart20-May-04 5:47
protectorHeath Stewart20-May-04 5:47 
GeneralRe: DataGrid, Generic GDI+ errors, and a Big Red X Pin
ABean19-May-04 15:11
ABean19-May-04 15:11 
I ran into a similar problem before. I understood that I had to update the control on the thread that created it and I wrote a queue mechanism to do this. However, I was surprised to see that the asynchronous callback from the event ran on different thread. (Now its obvious but it was unclear to me then.) Try setting the thread name property on the form where you create your datagrid. Then do a simple debug assert against this thread name property in the asynchronous callback to ensure that you are updating your datagrid on the correct thread. This will at least tell you whether or not your async callback is on the same thread. (My guess is that it isn’t but I’m still new to this .Net stuff)

//Place this in the form init
Thread.CurrentThread.Name ="UI thread";

//Place this in the async callback
Debug.Assert(Thread.CurrentThread.Name =="UI thread");

Heath’s recommendation about Invoke is sound advice.

GeneralC#'s sprintf Pin
ABean19-May-04 13:19
ABean19-May-04 13:19 
GeneralRe: C#'s sprintf Pin
Heath Stewart19-May-04 13:24
protectorHeath Stewart19-May-04 13:24 
GeneralRe: C#'s sprintf Pin
ABean19-May-04 13:26
ABean19-May-04 13:26 
GeneralRe: C#'s sprintf Pin
ABean19-May-04 13:25
ABean19-May-04 13:25 
GeneralRe: C#'s sprintf Pin
Heath Stewart19-May-04 13:32
protectorHeath Stewart19-May-04 13:32 
GeneralRe: C#'s sprintf Pin
ABean19-May-04 13:46
ABean19-May-04 13:46 
GeneralMysterious behaviour (freezing) Pin
GuntherR19-May-04 12:40
GuntherR19-May-04 12:40 
GeneralRe: Mysterious behaviour (freezing) Pin
je_gonzalez19-May-04 18:02
je_gonzalez19-May-04 18:02 
GeneralRe: Mysterious behaviour (freezing) Pin
GuntherR20-May-04 3:43
GuntherR20-May-04 3:43 
GeneralDllImport specification Pin
Colin Angus Mackay19-May-04 11:59
Colin Angus Mackay19-May-04 11:59 
GeneralRe: DllImport specification Pin
David M. Kean19-May-04 12:41
David M. Kean19-May-04 12:41 
GeneralRe: DllImport specification Pin
Heath Stewart19-May-04 13:25
protectorHeath Stewart19-May-04 13:25 
GeneralRe: DllImport specification Pin
David M. Kean19-May-04 16:11
David M. Kean19-May-04 16:11 
GeneralRe: DllImport specification Pin
Colin Angus Mackay21-May-04 9:13
Colin Angus Mackay21-May-04 9:13 
GeneralDesigner error Pin
Steve Schaneville19-May-04 11:47
professionalSteve Schaneville19-May-04 11:47 
GeneralRe: Designer error Pin
Heath Stewart19-May-04 13:36
protectorHeath Stewart19-May-04 13:36 
GeneralRe: Designer error Pin
Steve Schaneville19-May-04 17:08
professionalSteve Schaneville19-May-04 17:08 

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.