Jeff,
There is no equivalent in the .NET framework. However, you can call the
API through the P/Invoke layer, using the following declarations:
[StructLayout(LayoutKind.Sequential)]
public struct MSG
{
public IntPtr hwnd;
[MarshalAs(UnmanagedType.U4)]
public int message;
public IntPtr wParam;
public IntPtr lParam;
[MarshalAs(UnmanagedType.U4)]
public int time;
public Point pt;
}
[DllImport("user32.dll", CharSet=CharSet.Auto, SetLastError=true)]
public static extern bool PeekMessage(
ref MSG lpMsg,
IntPtr hWnd,
[MarshalAs(UnmanagedType.U4)] wMsgFilterMin,
[MarshalAs(UnmanagedType.U4)] wMsgFilterMax,
[MarshalAs(UnmanagedType.U4)] wRemoveMsg);
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Jeff" <a@a.com> wrote in message
news:em**************@TK2MSFTNGP11.phx.gbl...
What is the .Net Framework equivalent of the Windows API function
PeekMessage? Or any other method that will do the same thing. I simply
need to check to see if there are messages waiting to be processed.
Thanks!