internal class MessageOnlyWindow : NativeWindow { private const string WindowName = "MessageOnlyWindow"; public LowLevelView() { var createParams = new CreateParams { Style = 0, ExStyle = 0, ClassStyle = 0, Caption = WindowName }; if (Environment.OSVersion.Platform == PlatformID.Win32NT) { createParams.Parent = (IntPtr)(-3); } CreateHandle(createParams); } protected override void WndProc(ref Message m) { if (m.Msg >= 0x0400) { Debug.WriteLine(m.Msg); } base.WndProc(ref m); } }标签:WndProc,窗口,createParams,MessageOnlyWindow,WindowName,Msg,接收,ref,Winform From: https://www.cnblogs.com/xhubobo/p/18024561