Click here to Skip to main content
15,905,566 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Error ContextSwitchDeadlock Pin
Eddy Vluggen5-Dec-18 3:22
professionalEddy Vluggen5-Dec-18 3:22 
GeneralRe: Error ContextSwitchDeadlock Pin
desanti5-Dec-18 3:24
desanti5-Dec-18 3:24 
GeneralRe: Error ContextSwitchDeadlock Pin
Eddy Vluggen5-Dec-18 3:30
professionalEddy Vluggen5-Dec-18 3:30 
GeneralRe: Error ContextSwitchDeadlock Pin
desanti5-Dec-18 3:40
desanti5-Dec-18 3:40 
GeneralRe: Error ContextSwitchDeadlock Pin
Eddy Vluggen5-Dec-18 3:43
professionalEddy Vluggen5-Dec-18 3:43 
GeneralRe: Error ContextSwitchDeadlock Pin
Dave Kreskowiak5-Dec-18 5:58
mveDave Kreskowiak5-Dec-18 5:58 
GeneralRe: Error ContextSwitchDeadlock Pin
Dave Kreskowiak5-Dec-18 5:56
mveDave Kreskowiak5-Dec-18 5:56 
GeneralRe: Error ContextSwitchDeadlock Pin
Dave Kreskowiak5-Dec-18 5:55
mveDave Kreskowiak5-Dec-18 5:55 
Solution? Ignore it. The message only shows up when debugging the app.

And you're wrong about the BackgroundWorker not having access to the controls. Technically, you don't have access to them, but you can get at the controls if you supply method to update the controls and Invoke calls to them. Using the BackgroundWorker, or some other threading/Task model, will free up the UI thread to pump messages. This will also make the warning message you're seeing disappear.

Also, if you're doing everything in this long-running operation on the UI (startup) thread, then your controls are not getting repainted anyway. If the UI thread is busy with your operation, it can't respond to all the WM_PAINT messages that are piling up in the message pump. So, during this operation, what could you possibly be updating in the controls since nobody can see those changes?

If you're going to do a long-running operation with control interactions, you have to do it correctly, otherwise you run into little issues like what you're seeing.

QuestionInstallation of Visual Basic 6.0 on Windows 10 Pin
Member 140755163-Dec-18 0:13
Member 140755163-Dec-18 0:13 
AnswerRe: Installation of Visual Basic 6.0 on Windows 10 Pin
Mycroft Holmes3-Dec-18 14:04
professionalMycroft Holmes3-Dec-18 14:04 
AnswerRe: Installation of Visual Basic 6.0 on Windows 10 Pin
den2k883-Dec-18 21:56
professionalden2k883-Dec-18 21:56 
AnswerRe: Installation of Visual Basic 6.0 on Windows 10 Pin
Randor 3-Dec-18 22:15
professional Randor 3-Dec-18 22:15 
AnswerRe: Installation of Visual Basic 6.0 on Windows 10 Pin
kmoorevs4-Dec-18 6:09
kmoorevs4-Dec-18 6:09 
GeneralRe: Installation of Visual Basic 6.0 on Windows 10 Pin
Member 140755165-Dec-18 0:24
Member 140755165-Dec-18 0:24 
GeneralRe: Installation of Visual Basic 6.0 on Windows 10 Pin
Dave Kreskowiak5-Dec-18 5:48
mveDave Kreskowiak5-Dec-18 5:48 
QuestionHow can i dock the datagridviews ? Pin
desanti1-Dec-18 8:19
desanti1-Dec-18 8:19 
AnswerRe: How can i dock the datagridviews ? Pin
Eddy Vluggen2-Dec-18 0:26
professionalEddy Vluggen2-Dec-18 0:26 
AnswerRe: How can i dock the datagridviews ? Pin
Dave Kreskowiak2-Dec-18 7:59
mveDave Kreskowiak2-Dec-18 7:59 
QuestionCtypeDynamic : How can i detect if an expression can be converted to a specific Date format Pin
desanti25-Nov-18 1:00
desanti25-Nov-18 1:00 
AnswerRe: CtypeDynamic : How can i detect if an expression can be converted to a specific Date format Pin
Eddy Vluggen25-Nov-18 1:38
professionalEddy Vluggen25-Nov-18 1:38 
GeneralRe: CtypeDynamic : How can i detect if an expression can be converted to a specific Date format Pin
desanti25-Nov-18 1:46
desanti25-Nov-18 1:46 
GeneralRe: CtypeDynamic : How can i detect if an expression can be converted to a specific Date format Pin
Eddy Vluggen25-Nov-18 1:52
professionalEddy Vluggen25-Nov-18 1:52 
GeneralRe: CtypeDynamic : How can i detect if an expression can be converted to a specific Date format Pin
desanti25-Nov-18 1:57
desanti25-Nov-18 1:57 
GeneralRe: CtypeDynamic : How can i detect if an expression can be converted to a specific Date format Pin
Eddy Vluggen25-Nov-18 2:47
professionalEddy Vluggen25-Nov-18 2:47 
GeneralRe: CtypeDynamic : How can i detect if an expression can be converted to a specific Date format Pin
desanti25-Nov-18 3:05
desanti25-Nov-18 3:05 

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.