Click here to Skip to main content
16,014,095 members
Home / Discussions / C#
   

C#

 
GeneralRe: Strip commas Pin
Bee Master19-May-04 19:08
Bee Master19-May-04 19:08 
GeneralRe: Strip commas Pin
Uwe Keim19-May-04 23:24
sitebuilderUwe Keim19-May-04 23:24 
GeneralRe: Strip commas Pin
Bee Master20-May-04 5:09
Bee Master20-May-04 5:09 
GeneralRe: Strip commas Pin
Bitwise Gamgee20-May-04 5:22
Bitwise Gamgee20-May-04 5:22 
GeneralRTF - Codes Pin
Moon Boy19-May-04 14:12
Moon Boy19-May-04 14:12 
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 
If you're setting (and even getting sometimes) properties or calling methods on controls from your asynchronous callbacks, are you using Control.Invoke? It's important that when modifying a control from another thread (which async calls are on) that you make the changes in the thread on which the control was created. See the Control.Invoke method and Control.InvokeRequired property documentation in the .NET Framework SDK for more information.

Why does it works sometimes? It's not absolute behavior to fail or succeed (well, not in all cases) if you do modify a control from a different thread than what it was created on. It basically comes down to the Windows messaging system that is used for Windows Forms and the threads that the message pumps are running on. More information can be found in the .NET Framework SDK.

Another possibility is that you're not disposing disposable objects. While you'll typically run into memory problems, other strange things can happen as well (like depleating available handles). Telling us exact what the error was may help.

 

Microsoft MVP, Visual C#
My Articles
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 
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 

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.