Solved

In .NET is it possible to use a key other than F1 with the HelpProvider component?

Posted on 2009-03-31
8
378 Views
Last Modified: 2013-11-07
It is possible to use a key other than F1 with the HelpProvider component? Or a combination of keys other than F1?  Thank you!
0
Comment
Question by:MEINMEL
  • 5
  • 2
8 Comments
 
LVL 15

Expert Comment

by:spprivate
ID: 24033541
You want a help key association for the application you create or for your Visual Studio editor
0
 

Author Comment

by:MEINMEL
ID: 24033563
This would be for an application.  I want to use the F1 key for something else and Alt-F1 for the HelpProvider component. I am working in VB .NET.
0
 

Author Comment

by:MEINMEL
ID: 24042249
I really need an answer to this as quickly as possible.  If the answer is that I need 'a help key association', how do I set that up?  Thank you
0
 

Expert Comment

by:that_it_guy
ID: 24053594
You have to provide code in the key handler event to use other keys. For example:

Private Sub txtName_KeyDown(ByVal sender As Object, _
ByVal e As System.Windows.Forms.KeyEventArgs) _
Handles txtName.KeyDown
    If e.KeyCode = Keys.F1 And e.Alt Then
    Help.ShowPopup(txtName, "This is an alternative help message", _
    New Point(Me.Location.X + txtName.Location.X, _
    Me.Location.Y + txtName.Location.Y))
    End If
End Sub

This would show help if the Alt+F1 was pressed.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:MEINMEL
ID: 24053673
Thank you for your resonse!  Is it possible to create a wrapper class around the HelpProvider and intercept the F1 key?
0
 

Accepted Solution

by:
that_it_guy earned 500 total points
ID: 24053899
Not sure, but check out this link. Maybe it will help?

http://www.west-wind.com/WebLog/posts/1438.aspx
0
 

Author Comment

by:MEINMEL
ID: 24053939
Thank you!  If anyone has done this I would appreciate some input on how well it worked and if there were any negatives to doing this.
0
 

Author Closing Comment

by:MEINMEL
ID: 31564960
The solution was acceptable, but I would also like to have known if an Expert has done this before and if there were any problems.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now