Search:
Namespaces
Discussions
.NET v1.1
Feedback
Is Forms.Timer multithreaded or...?
Messages
Related Types
This message was discovered on
microsoft.public.dotnet.framework.windowsforms
.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Post a new message to this list...
Bryan Cool via .NET 247 (VIP)
I have a C# app with a child window (let's call it WindowY) and a
PropertyGrid
(the
PropertyGrid
is also a child of the app, not a child of WindowY). I used to have a System.Windows.Forms.
Timer
that would trigger a call into a C++ DLL (in the DLL is some code to paint WindowY). I also implemented some custom UITypeEditors for the
PropertyGrid
, which would pop up as modal dialogs and you could edit some properties; all the while, the timers would keep triggering the repaint on WindowY so you could see your changes in real-time.
Recently, the timers were removed and instead of
Application
.Run(), a standard message loop was directly written (using NativeMethods code). Now, when I go to edit something with one of the UITypeEditors in the
PropertyGrid
, the message loop of the main window appears to be inactivated, and WindowY is not refreshed. I expect this lack of refresh, since the editor is a modal dialog (though the same thing happens if I make the editor a drop-down); however, it's not something that I want: I need to have WindowY continue to be refreshed. Is there a way to make this happen? I don't really want to go back to using the timers, since there are some key benefits to rolling my own message loop. Does System.Windows.Forms.
Timer
bypass message loops? Is there a way to emulate that behavior?
--------------------------------
From: Bryan Cool
-----------------------
Posted by a user from .NET 247 (
http://www.dotnet247.com/
)
<Id>x2SUmthr9E69+V2yaq+D7Q==</Id>
Reply to this message...
Sijin Joseph
Windows is built fundamentally on message passing, i don't think there
is any way for an application to recv a timer message without a message
loop.
Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph
Bryan Cool via .NET 247 wrote:
[Original message clipped]
Reply to this message...
System.Windows.Forms.Application
System.Windows.Forms.PropertyGrid
System.Windows.Forms.Timer
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com