PC Review


Reply
Thread Tools Rate Thread

customizing how the help button works

 
 
=?Utf-8?B?TXJOb2JvZHk=?=
Guest
Posts: n/a
 
      29th Dec 2004
using .NET IDE I can add a help button to the top right of the title bar next
to minimize/mazimize/close. This button lets the user point to a specific
control and then get help on that control, but I was wondering if I can
override this behavior so when someone clicks this button it just opens a new
dialog with general info of that dialog. I want to do this because I don't
want to take up any space in my dialog with a menu or a new icon... and this
button in the title bar would be perfect! I just don't want that whole
point-to-a-control-to-get-help routine.
 
Reply With Quote
 
 
 
 
Chris Jobson
Guest
Posts: n/a
 
      29th Dec 2004
"MrNobody" <(E-Mail Removed)> wrote in message
news:ADE09147-536C-4239-BD33-(E-Mail Removed)...
> using .NET IDE I can add a help button to the top right of the title bar
> next
> to minimize/mazimize/close. This button lets the user point to a specific
> control and then get help on that control, but I was wondering if I can
> override this behavior so when someone clicks this button it just opens a
> new
> dialog with general info of that dialog. I want to do this because I don't
> want to take up any space in my dialog with a menu or a new icon... and
> this
> button in the title bar would be perfect! I just don't want that whole
> point-to-a-control-to-get-help routine.


If you really want to do this, you can override the form's WndProc to
intercept the message generated when the button is pressed, as in the
example below, but bear in mind that your application will then not behave
as an experienced Windows user will expect.

protected override void WndProc(ref Message m) {
const int WM_SYSCOMMAND = 0x0112;
const int SC_CONTEXTHELP = 0xF180;

if (m.Msg == WM_SYSCOMMAND && ((int)m.WParam & 0xFFF0) ==
SC_CONTEXTHELP) {
MessageBox.Show("Display a help dialog here");
m.Result = IntPtr.Zero;
}
else
base.WndProc(ref m);
}

Chris Jobson


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
customizing print button =?Utf-8?B?SmVzc2ll?= Microsoft Access Form Coding 4 11th Nov 2005 10:18 PM
Customizing Contact button =?Utf-8?B?UGV0ZXIgTWF0dHNzb24=?= Microsoft Outlook Form Programming 2 20th Oct 2005 09:46 PM
Customizing the start button Ben Windows XP General 1 3rd Apr 2004 09:32 PM
Customizing TO button in Outlook2000 Derf McKensy Microsoft Outlook Contacts 3 26th Dec 2003 08:57 AM
Customizing Start button Super-b Windows XP Customization 0 5th Aug 2003 05:15 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:02 AM.