Francois,
microsoft.public.dotnet.framework.windowsforms is a better group for
Windows Forms related questions.
>Does DotNet programs have a message pump?
Yes, it's started when you call Application.Run().
>Do we have access to the window handle of each form or control ?
Yes, check the Handle property.
>How do I write a message handler ?
You can override the virtual WndProc method and handle any custom
message.
Mattias

Signature
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.
jl.altair - 08 Dec 2003 12:26 GMT
[STAThread
static void Main()
Application.Run(new Form1())
protected override void WndProc(ref Message m)
int intTRUE = 0x1
int intFALSE = 0x0
switch (m.Msg)
case WM_SYSCOMMAND
if(m.WParam.ToInt32() == SC_SCREENSAVE)
if(numeroDeCiclos < 10)
m.Result = (IntPtr)intTRUE
return
else
break
default
break
base.WndProc (ref m)
}