Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
464 lines (440 sloc) 31.9 KB
<Type Name="Message" FullName="System.Windows.Forms.Message">
<TypeSignature Language="C#" Value="public struct Message" />
<TypeSignature Language="ILAsm" Value=".class public sequential ansi sealed beforefieldinit Message extends System.ValueType" />
<TypeSignature Language="DocId" Value="T:System.Windows.Forms.Message" />
<TypeSignature Language="VB.NET" Value="Public Structure Message" />
<TypeSignature Language="C++ CLI" Value="public value class Message" />
<TypeSignature Language="F#" Value="type Message = struct" />
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Implements a Windows message.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.Message> structure wraps messages that Windows sends. You can use this structure to wrap a message and assign it to the window procedure to be dispatched. You can also use this structure to get information about a message the system sends to your application or controls. For more information about Windows messages, see [Messages and Message Queues](https://go.microsoft.com/fwlink/?LinkId=198815).
You cannot create the <xref:System.Windows.Forms.Message> directly. Instead, use the <xref:System.Windows.Forms.Message.Create%2A> method. For the sake of efficiency, the <xref:System.Windows.Forms.Message> uses its pool of existing <xref:System.Windows.Forms.Message>s instead of instantiating a new one, if possible. However, if a <xref:System.Windows.Forms.Message> is not available in the pool, a new one is instantiated.
## Examples
The following code example demonstrates overriding the <xref:System.Windows.Forms.Control.WndProc%2A> method to handle operating system messages identified in the <xref:System.Windows.Forms.Message>. The WM_ACTIVATEAPP operating system message is handled in this example to know when another application is becoming active. For information about the available <xref:System.Windows.Forms.Message.Msg%2A?displayProperty=nameWithType>, <xref:System.Windows.Forms.Message.LParam%2A?displayProperty=nameWithType>, and <xref:System.Windows.Forms.Message.WParam%2A?displayProperty=nameWithType> values, see the [MSG Structure](https://go.microsoft.com/fwlink/?LinkId=198816) documentation. For information about the actual constant values, see [Message Constants](https://go.microsoft.com/fwlink/?LinkId=198817).
[!code-cpp[System.Windows.Forms.Control.WndProc#1](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.WndProc/CPP/form1.cpp#1)]
[!code-csharp[System.Windows.Forms.Control.WndProc#1](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.Control.WndProc/CS/form1.cs#1)]
[!code-vb[System.Windows.Forms.Control.WndProc#1](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.Control.WndProc/VB/form1.vb#1)]
]]></format>
</remarks>
<related type="ExternalDocumentation" href="https://go.microsoft.com/fwlink/?LinkId=198815">Messages and Message Queues</related>
<related type="ExternalDocumentation" href="https://go.microsoft.com/fwlink/?LinkId=198816">MSG Structure</related>
<related type="ExternalDocumentation" href="https://go.microsoft.com/fwlink/?LinkId=198817">Message Constants</related>
</Docs>
<Members>
<Member MemberName="Create">
<MemberSignature Language="C#" Value="public static System.Windows.Forms.Message Create (IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.Windows.Forms.Message Create(native int hWnd, int32 msg, native int wparam, native int lparam) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.Message.Create(System.IntPtr,System.Int32,System.IntPtr,System.IntPtr)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function Create (hWnd As IntPtr, msg As Integer, wparam As IntPtr, lparam As IntPtr) As Message" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::Windows::Forms::Message Create(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam);" />
<MemberSignature Language="F#" Value="static member Create : nativeint * int * nativeint * nativeint -&gt; System.Windows.Forms.Message" Usage="System.Windows.Forms.Message.Create (hWnd, msg, wparam, lparam)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Forms.Message</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="hWnd" Type="System.IntPtr" />
<Parameter Name="msg" Type="System.Int32" />
<Parameter Name="wparam" Type="System.IntPtr" />
<Parameter Name="lparam" Type="System.IntPtr" />
</Parameters>
<Docs>
<param name="hWnd">The window handle that the message is for.</param>
<param name="msg">The message ID.</param>
<param name="wparam">The message <paramref name="wparam" /> field.</param>
<param name="lparam">The message <paramref name="lparam" /> field.</param>
<summary>Creates a new <see cref="T:System.Windows.Forms.Message" />.</summary>
<returns>A <see cref="T:System.Windows.Forms.Message" /> that represents the message that was created.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Windows.Forms.Message.Create%2A> method to create a <xref:System.Windows.Forms.Message> to wrap a message sent by Windows.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Equals">
<MemberSignature Language="C#" Value="public override bool Equals (object o);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool Equals(object o) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.Message.Equals(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function Equals (o As Object) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override bool Equals(System::Object ^ o);" />
<MemberSignature Language="F#" Value="override this.Equals : obj -&gt; bool" Usage="message.Equals o" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="o" Type="System.Object" />
</Parameters>
<Docs>
<param name="o">The object to compare with the current object.</param>
<summary>Determines whether the specified object is equal to the current object.</summary>
<returns>
<see langword="true" /> if the specified object is equal to the current object; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetHashCode">
<MemberSignature Language="C#" Value="public override int GetHashCode ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetHashCode() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.Message.GetHashCode" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function GetHashCode () As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override int GetHashCode();" />
<MemberSignature Language="F#" Value="override this.GetHashCode : unit -&gt; int" Usage="message.GetHashCode " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns the hash code for this instance.</summary>
<returns>A 32-bit signed integer that is the hash code for this instance.</returns>
<remarks>To be added.</remarks>
<altmember cref="M:System.ValueType.GetHashCode" />
</Docs>
</Member>
<Member MemberName="GetLParam">
<MemberSignature Language="C#" Value="public object GetLParam (Type cls);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance object GetLParam(class System.Type cls) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.Message.GetLParam(System.Type)" />
<MemberSignature Language="VB.NET" Value="Public Function GetLParam (cls As Type) As Object" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Object ^ GetLParam(Type ^ cls);" />
<MemberSignature Language="F#" Value="member this.GetLParam : Type -&gt; obj" Usage="message.GetLParam cls" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="cls" Type="System.Type" />
</Parameters>
<Docs>
<param name="cls">The type to use to create an instance. This type must be declared as a structure type.</param>
<summary>Gets the <see cref="P:System.Windows.Forms.Message.LParam" /> value and converts the value to an object.</summary>
<returns>An <see cref="T:System.Object" /> that represents an instance of the class specified by the <paramref name="cls" /> parameter, with the data from the <see cref="P:System.Windows.Forms.Message.LParam" /> field of the message.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Windows.Forms.Message.GetLParam%2A> method to retrieve information from the <xref:System.Windows.Forms.Message.LParam%2A> field of a message and convert it to an object. You can use this method to access objects passed in a message.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="HWnd">
<MemberSignature Language="C#" Value="public IntPtr HWnd { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance native int HWnd" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.Message.HWnd" />
<MemberSignature Language="VB.NET" Value="Public Property HWnd As IntPtr" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property IntPtr HWnd { IntPtr get(); void set(IntPtr value); };" />
<MemberSignature Language="F#" Value="member this.HWnd : nativeint with get, set" Usage="System.Windows.Forms.Message.HWnd" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.IntPtr</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the window handle of the message.</summary>
<value>The window handle of the message.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
*Window handle* is a value that uniquely identifies a window on the system. This property returns a handle of the window whose window procedure receives this message. It is useful when your code need to interact with some native Windows API functions that expect window handles as parameters.
]]></format>
</remarks>
<related type="ExternalDocumentation" href="/windows/desktop/winmsg/about-windows#window-handle">Window Handle</related>
</Docs>
</Member>
<Member MemberName="LParam">
<MemberSignature Language="C#" Value="public IntPtr LParam { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance native int LParam" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.Message.LParam" />
<MemberSignature Language="VB.NET" Value="Public Property LParam As IntPtr" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property IntPtr LParam { IntPtr get(); void set(IntPtr value); };" />
<MemberSignature Language="F#" Value="member this.LParam : nativeint with get, set" Usage="System.Windows.Forms.Message.LParam" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.IntPtr</ReturnType>
</ReturnValue>
<Docs>
<summary>Specifies the <see cref="P:System.Windows.Forms.Message.LParam" /> field of the message.</summary>
<value>The <see cref="P:System.Windows.Forms.Message.LParam" /> field of the message.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The value of this field depends on the message. Use the <xref:System.Windows.Forms.Message.LParam%2A> field to get information that is important for handling the message. <xref:System.Windows.Forms.Message.LParam%2A> is typically used to store an object if it is needed by the message. Use the <xref:System.Windows.Forms.Message.GetLParam%2A> method to retrieve and convert information from the <xref:System.Windows.Forms.Message.LParam%2A> field into an object.
]]></format>
</remarks>
<related type="ExternalDocumentation" href="https://go.microsoft.com/fwlink/?LinkId=198815">Messages and Message Queues</related>
<related type="ExternalDocumentation" href="https://go.microsoft.com/fwlink/?LinkId=198816">MSG Structure</related>
<related type="ExternalDocumentation" href="https://go.microsoft.com/fwlink/?LinkId=198817">Message Constants</related>
</Docs>
</Member>
<Member MemberName="Msg">
<MemberSignature Language="C#" Value="public int Msg { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 Msg" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.Message.Msg" />
<MemberSignature Language="VB.NET" Value="Public Property Msg As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int Msg { int get(); void set(int value); };" />
<MemberSignature Language="F#" Value="member this.Msg : int with get, set" Usage="System.Windows.Forms.Message.Msg" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the ID number for the message.</summary>
<value>The ID number for the message.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates overriding the <xref:System.Windows.Forms.Control.WndProc%2A> method to handle operating system messages identified in the <xref:System.Windows.Forms.Message>. The WM_ACTIVATEAPP operating system message is handled in this example to know when another application is becoming active. For information about the available <xref:System.Windows.Forms.Message.Msg%2A?displayProperty=nameWithType>, <xref:System.Windows.Forms.Message.LParam%2A?displayProperty=nameWithType>, and <xref:System.Windows.Forms.Message.WParam%2A?displayProperty=nameWithType> values, see the [MSG Structure](https://go.microsoft.com/fwlink/?LinkId=198816) documentation. For information about the actual constant values, see [Message Constants](https://go.microsoft.com/fwlink/?LinkId=198817).
[!code-cpp[System.Windows.Forms.Control.WndProc#1](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.WndProc/CPP/form1.cpp#1)]
[!code-csharp[System.Windows.Forms.Control.WndProc#1](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.Control.WndProc/CS/form1.cs#1)]
[!code-vb[System.Windows.Forms.Control.WndProc#1](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.Control.WndProc/VB/form1.vb#1)]
]]></format>
</remarks>
<related type="ExternalDocumentation" href="https://go.microsoft.com/fwlink/?LinkId=198815">Messages and Message Queues</related>
<related type="ExternalDocumentation" href="https://go.microsoft.com/fwlink/?LinkId=198816">MSG Structure</related>
<related type="ExternalDocumentation" href="https://go.microsoft.com/fwlink/?LinkId=198817">Message Constants</related>
</Docs>
</Member>
<Member MemberName="op_Equality">
<MemberSignature Language="C#" Value="public static bool operator == (System.Windows.Forms.Message a, System.Windows.Forms.Message b);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname bool op_Equality(valuetype System.Windows.Forms.Message a, valuetype System.Windows.Forms.Message b) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.Message.op_Equality(System.Windows.Forms.Message,System.Windows.Forms.Message)" />
<MemberSignature Language="VB.NET" Value="Public Shared Operator == (a As Message, b As Message) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static bool operator ==(System::Windows::Forms::Message a, System::Windows::Forms::Message b);" />
<MemberSignature Language="F#" Value="static member ( = ) : System.Windows.Forms.Message * System.Windows.Forms.Message -&gt; bool" Usage="a = b" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="a" Type="System.Windows.Forms.Message" Index="0" FrameworkAlternate="netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<Parameter Name="b" Type="System.Windows.Forms.Message" Index="1" FrameworkAlternate="netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="a">A <see cref="T:System.Windows.Forms.Message" /> to compare to <paramref name="b" />.</param>
<param name="b">A <see cref="T:System.Windows.Forms.Message" /> to compare to <paramref name="a" />.</param>
<summary>Determines whether two instances of <see cref="T:System.Windows.Forms.Message" /> are equal.</summary>
<returns>
<see langword="true" /> if <paramref name="a" /> and <paramref name="b" /> represent the same <see cref="T:System.Windows.Forms.Message" />; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[The equivalent method for this operator is <xref:System.Windows.Forms.Message.Equals%2A?displayProperty=nameWithType>]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="op_Inequality">
<MemberSignature Language="C#" Value="public static bool operator != (System.Windows.Forms.Message a, System.Windows.Forms.Message b);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname bool op_Inequality(valuetype System.Windows.Forms.Message a, valuetype System.Windows.Forms.Message b) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.Message.op_Inequality(System.Windows.Forms.Message,System.Windows.Forms.Message)" />
<MemberSignature Language="VB.NET" Value="Public Shared Operator != (a As Message, b As Message) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static bool operator !=(System::Windows::Forms::Message a, System::Windows::Forms::Message b);" />
<MemberSignature Language="F#" Value="static member op_Inequality : System.Windows.Forms.Message * System.Windows.Forms.Message -&gt; bool" Usage="System.Windows.Forms.Message.op_Inequality (a, b)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="a" Type="System.Windows.Forms.Message" Index="0" FrameworkAlternate="netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<Parameter Name="b" Type="System.Windows.Forms.Message" Index="1" FrameworkAlternate="netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="a">A <see cref="T:System.Windows.Forms.Message" /> to compare to <paramref name="b" />.</param>
<param name="b">A <see cref="T:System.Windows.Forms.Message" /> to compare to <paramref name="a" />.</param>
<summary>Determines whether two instances of <see cref="T:System.Windows.Forms.Message" /> are not equal.</summary>
<returns>
<see langword="true" /> if <paramref name="a" /> and <paramref name="b" /> do not represent the same <see cref="T:System.Windows.Forms.Message" />; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[The equivalent method for this operator is the negation of <xref:System.Windows.Forms.Message.Equals%2A?displayProperty=nameWithType>]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Result">
<MemberSignature Language="C#" Value="public IntPtr Result { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance native int Result" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.Message.Result" />
<MemberSignature Language="VB.NET" Value="Public Property Result As IntPtr" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property IntPtr Result { IntPtr get(); void set(IntPtr value); };" />
<MemberSignature Language="F#" Value="member this.Result : nativeint with get, set" Usage="System.Windows.Forms.Message.Result" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.IntPtr</ReturnType>
</ReturnValue>
<Docs>
<summary>Specifies the value that is returned to Windows in response to handling the message.</summary>
<value>The return value of the message.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ToString">
<MemberSignature Language="C#" Value="public override string ToString ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string ToString() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.Message.ToString" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function ToString () As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override System::String ^ ToString();" />
<MemberSignature Language="F#" Value="override this.ToString : unit -&gt; string" Usage="message.ToString " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns a <see cref="T:System.String" /> that represents the current <see cref="T:System.Windows.Forms.Message" />.</summary>
<returns>A <see cref="T:System.String" /> that represents the current <see cref="T:System.Windows.Forms.Message" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="WParam">
<MemberSignature Language="C#" Value="public IntPtr WParam { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance native int WParam" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.Message.WParam" />
<MemberSignature Language="VB.NET" Value="Public Property WParam As IntPtr" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property IntPtr WParam { IntPtr get(); void set(IntPtr value); };" />
<MemberSignature Language="F#" Value="member this.WParam : nativeint with get, set" Usage="System.Windows.Forms.Message.WParam" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.IntPtr</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the <see cref="P:System.Windows.Forms.Message.WParam" /> field of the message.</summary>
<value>The <see cref="P:System.Windows.Forms.Message.WParam" /> field of the message.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The value of this field depends on the message. Use the <xref:System.Windows.Forms.Message.WParam%2A> field to get information that is important to handling the message. This field is typically used to store small pieces of information, such as flags.
## Examples
The following code example demonstrates overriding the <xref:System.Windows.Forms.Control.WndProc%2A> method to handle operating system messages identified in the <xref:System.Windows.Forms.Message>. The WM_ACTIVATEAPP operating system message is handled in this example to know when another application is becoming active. For information about the available <xref:System.Windows.Forms.Message.Msg%2A?displayProperty=nameWithType>, <xref:System.Windows.Forms.Message.LParam%2A?displayProperty=nameWithType>, and <xref:System.Windows.Forms.Message.WParam%2A?displayProperty=nameWithType> values, see the [MSG Structure](https://go.microsoft.com/fwlink/?LinkId=198816) documentation. For information about the actual constant values, see [Message Constants](https://go.microsoft.com/fwlink/?LinkId=198817).
[!code-cpp[System.Windows.Forms.Control.WndProc#1](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.Control.WndProc/CPP/form1.cpp#1)]
[!code-csharp[System.Windows.Forms.Control.WndProc#1](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.Control.WndProc/CS/form1.cs#1)]
[!code-vb[System.Windows.Forms.Control.WndProc#1](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.Control.WndProc/VB/form1.vb#1)]
]]></format>
</remarks>
<related type="ExternalDocumentation" href="https://go.microsoft.com/fwlink/?LinkId=198815">Messages and Message Queues</related>
<related type="ExternalDocumentation" href="https://go.microsoft.com/fwlink/?LinkId=198816">MSG Structure</related>
<related type="ExternalDocumentation" href="https://go.microsoft.com/fwlink/?LinkId=198817">Message Constants</related>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.