Click here to Skip to main content
15,899,026 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Executing function on GUI-thread Pin
invictus323-Jun-07 9:12
invictus323-Jun-07 9:12 
GeneralRe: Executing function on GUI-thread Pin
Luc Pattyn23-Jun-07 9:58
sitebuilderLuc Pattyn23-Jun-07 9:58 
Aha, I see two possible ways to solve that:

1.
the official way: if your library is independent of the GUI, then it should
not be interested in the GUI thread either. If it needs something done by the app
it should use delegates/events to get the app's attention so it can process
the event. If (part of) the app's reaction needs to run on the GUI thread, then
that's the app's responsibility, so it must organize the InvokeRequired/Invoke stuff.

2.
a hack: create a GUI Control in your app, and pass it on to your library
(maybe thru a Property, possibly a static one). Now your library can use
Invoke itself. You should describe this behavior in your library's documentation
though, since now, even when called from a background thread, the library can load
the GUI thread and harm the resposiveness of the app that uses the library.

Smile | :)


GeneralRe: Executing function on GUI-thread Pin
invictus323-Jun-07 10:23
invictus323-Jun-07 10:23 
GeneralRe: Executing function on GUI-thread Pin
Luc Pattyn23-Jun-07 10:28
sitebuilderLuc Pattyn23-Jun-07 10:28 
GeneralRe: Executing function on GUI-thread Pin
invictus323-Jun-07 10:50
invictus323-Jun-07 10:50 
GeneralRe: Executing function on GUI-thread Pin
Luc Pattyn23-Jun-07 12:40
sitebuilderLuc Pattyn23-Jun-07 12:40 
Question.NET 3.5 Beta 1 Pin
Brendan Vogt22-Jun-07 6:16
Brendan Vogt22-Jun-07 6:16 
AnswerRe: .NET 3.5 Beta 1 Pin
Scott Dorman22-Jun-07 7:25
professionalScott Dorman22-Jun-07 7:25 
Question.NET 3.0 Getting Started Pin
Brendan Vogt22-Jun-07 6:14
Brendan Vogt22-Jun-07 6:14 
AnswerRe: .NET 3.0 Getting Started Pin
Scott Dorman22-Jun-07 7:25
professionalScott Dorman22-Jun-07 7:25 
AnswerRe: .NET 3.0 Getting Started Pin
Kevin McFarlane23-Jun-07 0:21
Kevin McFarlane23-Jun-07 0:21 
GeneralRe: .NET 3.0 Getting Started Pin
Brendan Vogt23-Jun-07 2:08
Brendan Vogt23-Jun-07 2:08 
QuestionInterop.MSXML2.dll Pin
Sebastian T Xavier22-Jun-07 0:13
Sebastian T Xavier22-Jun-07 0:13 
AnswerRe: Interop.MSXML2.dll Pin
Vasudevan Deepak Kumar22-Jun-07 5:27
Vasudevan Deepak Kumar22-Jun-07 5:27 
QuestionScroll a panel manually Pin
Dillipb21-Jun-07 19:29
Dillipb21-Jun-07 19:29 
AnswerRe: Scroll a panel manually Pin
Manas Bhardwaj22-Jun-07 5:24
professionalManas Bhardwaj22-Jun-07 5:24 
AnswerRe: Scroll a panel manually Pin
Vasudevan Deepak Kumar22-Jun-07 5:30
Vasudevan Deepak Kumar22-Jun-07 5:30 
QuestionC#/VS2005 Event fired on Network Activity Pin
xcguy8721-Jun-07 7:16
xcguy8721-Jun-07 7:16 
AnswerRe: C#/VS2005 Event fired on Network Activity Pin
Dave Kreskowiak21-Jun-07 7:48
mveDave Kreskowiak21-Jun-07 7:48 
GeneralRe: C#/VS2005 Event fired on Network Activity Pin
xcguy8710-Jul-07 9:10
xcguy8710-Jul-07 9:10 
GeneralRe: C#/VS2005 Event fired on Network Activity Pin
Dave Kreskowiak10-Jul-07 9:18
mveDave Kreskowiak10-Jul-07 9:18 
QuestionHow to customize BackgroundWorker Pin
sro11621-Jun-07 5:21
sro11621-Jun-07 5:21 
AnswerRe: How to customize BackgroundWorker Pin
Scott Dorman22-Jun-07 7:29
professionalScott Dorman22-Jun-07 7:29 
Questioncreating XmlNode tree without XmlDocument Pin
invictus321-Jun-07 5:12
invictus321-Jun-07 5:12 
AnswerRe: creating XmlNode tree without XmlDocument Pin
PIEBALDconsult21-Jun-07 11:19
mvePIEBALDconsult21-Jun-07 11:19 

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.