[Mono-bugs] [Bug 516735] New: Application.DoEvents does not call Application.FilterMessage like Application.Run does
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Jun 26 04:51:58 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=516735
Summary: Application.DoEvents does not call
Application.FilterMessage like Application.Run does
Classification: Mono
Product: Mono: Class Libraries
Version: SVN
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Windows.Forms
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: skolima at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.0.11)
Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729)
Application.DoEvents pumps messages through XplatUI, but does not call
Application.FilterMessage thus not feeding Messages to registered
IMessageFilter.PreFilterMessage.
Reproducible: Always
Steps to Reproduce:
1. Compile (gmcs -t:exe -r:System.Windows.Forms Test.cs) and run the following
code
using System;
using System.Windows.Forms;
namespace ConsoleApplication1
{
class Program : IMessageFilter
{
static void Main()
{
Application.AddMessageFilter(new Program());
var form = new Form();
form.Show();
while(true)
Application.DoEvents();
//Application.Run(form);
}
public bool PreFilterMessage(ref Message m)
{
Console.WriteLine("Message [{0}] [{1}]", m.Msg,
(Keys)m.WParam.ToInt32() & Keys.KeyCode);
return false;
}
}
}
Actual Results:
A window opens, but no events are logged onto the console.
Expected Results:
Multiple events are logged (as would happen if the while(true) loop was
replaced with the commented out Application.Run(form);
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list