BaseForm.WndProc(Message) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Reroutes the context-sensitive Help button events to the ShowHelp() method.
protected:
override void WndProc(System::Windows::Forms::Message % m);
protected override void WndProc (ref System.Windows.Forms.Message m);
override this.WndProc : -> unit
Protected Overrides Sub WndProc (ByRef m As Message)
Parameters
Examples
The following example reroutes the context-sensitive Help button events to the ShowHelp method and logs calls to the ShowHelp method.
private const int SC_CONTEXTHELP = 0xF180;
private const int WM_SYSCOMMAND = 0x0112;
protected override void WndProc(ref Message m) {
if ((m.Msg == WM_SYSCOMMAND) &&
((int)m.WParam == SC_CONTEXTHELP)) {
if (CanShowHelp) {
ShowHelp();
LogHelpCalls();
}
} else {
base.WndProc(ref m);
}
}