.NETGURU
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 Guru (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 Guru (http://www.dot-net-guru.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 Guru wrote:
[Original message clipped]

Reply to this message...
 
 
System.Windows.Forms.Application
System.Windows.Forms.PropertyGrid
System.Windows.Forms.Timer




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification