Control.ReflectMessage 方法

向绑定到指定句柄的控件反映指定消息。

**命名空间:**System.Windows.Forms
**程序集:**System.Windows.Forms(在 system.windows.forms.dll 中)

语法

声明
Protected Shared Function ReflectMessage ( _
    hWnd As IntPtr, _
    ByRef m As Message _
) As Boolean
用法
Dim hWnd As IntPtr
Dim m As Message
Dim returnValue As Boolean

returnValue = Control.ReflectMessage(hWnd, m)
protected static bool ReflectMessage (
    IntPtr hWnd,
    ref Message m
)
protected:
static bool ReflectMessage (
    IntPtr hWnd, 
    Message% m
)
protected static boolean ReflectMessage (
    IntPtr hWnd, 
    /** @ref */ Message m
)
JScript 不支持通过引用传递值类型参数。

参数

  • hWnd
    IntPtr 表示要反射消息的控件句柄。
  • m
    Message 表示要反射的 Windows 消息。

返回值

如果已反映消息,则为 true;否则为 false

备注

ReflectMessage 方法是一种基础结构方法,通常不应该从代码中调用此方法。

如果 hWnd 参数不表示一个有效控件,则 ReflectMessage 方法返回 false

由于 Windows 消息返回到顶级窗口,所以 ReflectMessage 方法可用于将返回消息传播到发送该消息的控件。有关更多信息,请参见位于 https://www.microsoft.com/china/msdn/library. 上的 MSDN Library 中的“Common Controls”(公共控件)主题。

.NET Framework 安全性

平台

Windows 98、Windows 2000 SP4、Windows CE、Windows Millennium Edition、Windows Mobile for Pocket PC、Windows Mobile for Smartphone、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

请参见

参考

Control 类
Control 成员
System.Windows.Forms 命名空间
WndProc
PreProcessMessage