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

.NET (Core and Framework)

 
AnswerRe: store procedure Pin
saanj28-May-09 3:03
saanj28-May-09 3:03 
QuestionHow to override the message loop in winforms? Pin
Felix Collins26-May-09 17:56
Felix Collins26-May-09 17:56 
AnswerRe: How to override the message loop in winforms? Pin
Pete O'Hanlon26-May-09 21:39
mvePete O'Hanlon26-May-09 21:39 
GeneralRe: How to override the message loop in winforms? Pin
Felix Collins27-May-09 16:55
Felix Collins27-May-09 16:55 
GeneralRe: How to override the message loop in winforms? Pin
Luc Pattyn27-May-09 17:20
sitebuilderLuc Pattyn27-May-09 17:20 
GeneralRentrant event processing. Was : How to override the message loop in winforms? Pin
Felix Collins27-May-09 18:12
Felix Collins27-May-09 18:12 
GeneralRe: Rentrant event processing. Was : How to override the message loop in winforms? Pin
dybs29-May-09 17:10
dybs29-May-09 17:10 
GeneralRe: Rentrant event processing. Was : How to override the message loop in winforms? Pin
Felix Collins31-May-09 12:49
Felix Collins31-May-09 12:49 
Hi Dybs,
naturally that is a great solution if you can easily identify SomeEvent and NestedEvent, however in my case this is not so easy, there are many events that can lead to a DirectShow call and many events that could be unsafe to process nested within another call. I could search through my code and put locks in all event handlers that look likely to cause trouble but this discipline would need to be maintained in maintenance and future development, so is not ideal. The solution you propose is really a special case of my proposal to override the wndproc of all forms (by using a custom BaseForm class). The whole point of an event queue and a single gui thread is so that in programming these events one can consider them as occurring serially. Overriding message processing for the whole app will place some overhead on all activity so I'd rather avoid the wndproc solution. Another disadvantage is that by effectively discarding some messages I might see strange behaviour, for example if a user started typing while in the lock the letters entered up to the point of releasing the lock would be lost.

The alternative solution I'm going to investigate is to start a second thread with its own message loop and make all DirectShow calls synchronously on that thread. Due to good architectural choices early on in the project the references to DirectShow in my application are limited to one module so it should be easy to ensure that all calls are routed through the second thread. If it works I'll post an article here to explain the solution.

Regards,
Felix
GeneralRe: Rentrant event processing. Was : How to override the message loop in winforms? Pin
Felix Collins7-Jun-09 16:33
Felix Collins7-Jun-09 16:33 
QuestionNATUPNPLib - Which local IP to use? Pin
Andrey U26-May-09 11:42
Andrey U26-May-09 11:42 
AnswerRe: NATUPNPLib - Which local IP to use? Pin
Dave Kreskowiak27-May-09 7:42
mveDave Kreskowiak27-May-09 7:42 
QuestionEven targeting 3.5, metadata version v2.0.50727 ? Pin
GuimaSun26-May-09 9:17
GuimaSun26-May-09 9:17 
AnswerRe: Even targeting 3.5, metadata version v2.0.50727 ? Pin
Dave Kreskowiak26-May-09 9:23
mveDave Kreskowiak26-May-09 9:23 
GeneralRe: Even targeting 3.5, metadata version v2.0.50727 ? Pin
GuimaSun26-May-09 10:01
GuimaSun26-May-09 10:01 
GeneralRe: Even targeting 3.5, metadata version v2.0.50727 ? Pin
Dave Kreskowiak26-May-09 16:04
mveDave Kreskowiak26-May-09 16:04 
Questioncode for logout button in c# Pin
manjusha s26-May-09 2:27
manjusha s26-May-09 2:27 
AnswerRe: code for logout button in c# [REPOST!!! Please ignore.] Pin
Henry Minute26-May-09 2:50
Henry Minute26-May-09 2:50 
AnswerStop. Desist. Leave now. Pin
Pete O'Hanlon26-May-09 3:08
mvePete O'Hanlon26-May-09 3:08 
Questiondoes .net Framework(2.0 and 3.5) Supports Robotics language VPL Pin
dewana26726-May-09 0:58
dewana26726-May-09 0:58 
AnswerRe: does .net Framework(2.0 and 3.5) Supports Robotics language VPL Pin
Dave Kreskowiak26-May-09 4:16
mveDave Kreskowiak26-May-09 4:16 
QuestionLogout code in C# Pin
manjusha s26-May-09 0:39
manjusha s26-May-09 0:39 
AnswerRe: Logout code in C# Pin
annathor27-May-09 0:57
annathor27-May-09 0:57 
QuestionLogout code in C# Pin
manjusha s26-May-09 0:23
manjusha s26-May-09 0:23 
AnswerRe: Logout code in C# Pin
Henry Minute26-May-09 0:26
Henry Minute26-May-09 0:26 
QuestionForm Disposal and Null Containers Pin
Tristan Rhodes26-May-09 0:14
Tristan Rhodes26-May-09 0:14 

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.