473,839 Members | 1,361 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Any way to allow F1 help for menu items in VB.NET?

In VB6, I used a system, which I loved, whereby I assigned a "helpId" to each
menu item; that way, you could rest the cursor on the item (without actually
running it) and then press F1 to get context help with that particular
command.

In VB6 this was easy, since each menu item had a "helpId" property. That
doesn't seem to be the case in VB.NET. Am I wrong about that, or
(alternatively) is there some other way to accomplish this?

--
Thanks.
ro*****@hotmail .com
Jun 4 '06 #1
4 4157
Bob,

I don't know what you want to do, but every menuItem in Net 2.0 has a tag
item from the type item.
You can in fact millions of fields put in that by creating a class and
instance that as object.

http://msdn2.microsoft.com/en-us/lib....menu.tag.aspx

In your case it is probably not even needed and can you just put a string in
it.

Cor

"Bob Homes" <ro*****@hotmai l.com.(nospam)> schreef in bericht
news:03******** *************** ***********@mic rosoft.com...
In VB6, I used a system, which I loved, whereby I assigned a "helpId" to
each
menu item; that way, you could rest the cursor on the item (without
actually
running it) and then press F1 to get context help with that particular
command.

In VB6 this was easy, since each menu item had a "helpId" property. That
doesn't seem to be the case in VB.NET. Am I wrong about that, or
(alternatively) is there some other way to accomplish this?

--
Thanks.
ro*****@hotmail .com

Jun 4 '06 #2
Cor,

But how can you find out if a user is pointing to a particular menu item
(not selecting it, just resting the cursor on it) -- so that you can display
the correct help topic just be pressing the F1 key? (or alternately, pressing
some other function key, if F1 is dedicated to VbNet's help object)?
--
Thanks.
ro*****@hotmail .com
"Cor Ligthert [MVP]" wrote:
Bob,

I don't know what you want to do, but every menuItem in Net 2.0 has a tag
item from the type item.
You can in fact millions of fields put in that by creating a class and
instance that as object.

http://msdn2.microsoft.com/en-us/lib....menu.tag.aspx

In your case it is probably not even needed and can you just put a string in
it.

Cor

"Bob Homes" <ro*****@hotmai l.com.(nospam)> schreef in bericht
news:03******** *************** ***********@mic rosoft.com...
In VB6, I used a system, which I loved, whereby I assigned a "helpId" to
each
menu item; that way, you could rest the cursor on the item (without
actually
running it) and then press F1 to get context help with that particular
command.

In VB6 this was easy, since each menu item had a "helpId" property. That
doesn't seem to be the case in VB.NET. Am I wrong about that, or
(alternatively) is there some other way to accomplish this?

--
Thanks.
ro*****@hotmail .com


Jun 4 '06 #3
Bob,

If you are using .NET 1.x you provide help trapping the MenuItem Select
event:

Private Sub MenuItem2_Selec t(ByVal sender As Object, ByVal e As
System.EventArg s) Handles MenuItem2.Selec t

MessageBox.Show ("Found")

End Sub

If you are using .NET 2.0 and the ToolStripMenu you can provide help by
trapping the ToolStripMenuIt em MouseEnter event:

Private Sub CutToolStripMen uItem_MouseEnte r(ByVal sender As Object, ByVal e
As System.EventArg s) Handles CutToolStripMen uItem.MouseEnte r

MessageBox.Show ("found")

End Sub

"Bob Homes" <ro*****@hotmai l.com.(nospam)> wrote in message
news:03******** *************** ***********@mic rosoft.com...
In VB6, I used a system, which I loved, whereby I assigned a "helpId" to
each
menu item; that way, you could rest the cursor on the item (without
actually
running it) and then press F1 to get context help with that particular
command.

In VB6 this was easy, since each menu item had a "helpId" property. That
doesn't seem to be the case in VB.NET. Am I wrong about that, or
(alternatively) is there some other way to accomplish this?

--
Thanks.
ro*****@hotmail .com

Jun 6 '06 #4
Mike,

Thanks for the idea, its a good one (and I'll probably use it sometime --
I've always wanted to have a way to display a one-line help comment in a
status bar at the bottom of a window, when the user moves his mouse onto a
menu item. I don't think I could do that in VB6).

However, that's not what I am trying to do right now. I guess I didn't make
myself clear, because you're the second person to not quite see what I'm
trying to do. I think what I'm trying to do isn't being done by anyone else,
since I thought of it myself and have never seen any programs (other than my
own) that do this.

Here's the thing -- I want to be able to move my mouse over a menu item
(say, by opening the File menu, and moving down to the Exit item on the
dropdown), and then press the F1 key while the "Exit" item is highlighted
(but NOT clicked). In VB6, each menu item had a HelpContextId property, and I
would assign a number to that property of each menu item in the entire menu
system of my program. I would then write a HTML help system, with a help
topic assigned to each menu item (with a number corresponding to the
HelpContextId assigned to the menu item in the program). Then, the User could
highlight a menu item (such as File/Exit) and then -- WITHOUT clicking the
item, ie, not running the command represented by that item -- press F1 and
immediately see context help for that particular menu item. This was a great
way to write an entire HTML help system just by writing a help topic for each
menu item in the program. In fact, I wrote a program to automatically do most
of that. However, there doesn't seem to be any "HelpContex tId" type property
for the individual menu items in a VB.NET program.

I don't think I can accomplish the foregoing by, as you suggested,
responding to the event of the User moving the mouse over a menu item. If
that were the case, the User would be getting help (even if he didn't want
it) every time he tried to select a menu item.

After getting your suggesting, I looked through the possible events for the
menu item object (if it IS an "object"), and I didn't seen any event that
would respond to the user pressing a key, whether it be F1 or any other key.
Thus, I don't think using an event to accomplish what I want is going to work.

Someone else responded to my question by suggesting that I use the TAG
property of the menu item. But he didn't explain how to use that to do what
I'm trying to do. I think what I'm trying to do can only be accomplished if
there is some way to allow the user to press a key while a menu item is
highlighted. Even if there was a way to do that, you would still have to know
what menu item was highlighted at that particular time, but I also don't know
how to determine that programatically .

If you have any further thoughts, I'd sure be thankful to hear them.

Thanks.
ro*****@hotmail .com
"Mike McIntyre" wrote:
Bob,

If you are using .NET 1.x you provide help trapping the MenuItem Select
event:

Private Sub MenuItem2_Selec t(ByVal sender As Object, ByVal e As
System.EventArg s) Handles MenuItem2.Selec t

MessageBox.Show ("Found")

End Sub

If you are using .NET 2.0 and the ToolStripMenu you can provide help by
trapping the ToolStripMenuIt em MouseEnter event:

Private Sub CutToolStripMen uItem_MouseEnte r(ByVal sender As Object, ByVal e
As System.EventArg s) Handles CutToolStripMen uItem.MouseEnte r

MessageBox.Show ("found")

End Sub

"Bob Homes" <ro*****@hotmai l.com.(nospam)> wrote in message
news:03******** *************** ***********@mic rosoft.com...
In VB6, I used a system, which I loved, whereby I assigned a "helpId" to
each
menu item; that way, you could rest the cursor on the item (without
actually
running it) and then press F1 to get context help with that particular
command.

In VB6 this was easy, since each menu item had a "helpId" property. That
doesn't seem to be the case in VB.NET. Am I wrong about that, or
(alternatively) is there some other way to accomplish this?

--
Thanks.
ro*****@hotmail .com


Jun 6 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3910
by: Jackson Yap | last post by:
can someone kind enough to help me look at the attached html and js file? Why is it that the javascript menu could not work at www.apchosting.net but could work at http://home.pacific.net.sg/~jacksony ? (the drop down bar could not work at www.apchosting.net but can drop at home.pacific.net.sg. I suspect it is a server problem but was told it is not possible, therefore assuming it is a client script problem? the script works last time...
8
10106
by: Dennis C. Drumm | last post by:
Is there a way to modify the standard context menu shown when someone right clicks in a windows text box and that would work for all open windows applications? The standard context menu for a text box has 6 items, undo, cut, copy, paste, delete and select all. I would like to add one additional paste menu that opens a new sub menu with several optional text items that could be pasted. The items would be populated by my program but...
6
3246
by: Sandy | last post by:
Hello - I have a book that illustrates pulling menu items from a Sql Server table into an ascx via a stored procedure. Is this something that is done in the real world? I do like the effect when viewing it in the source code, however, because it doesn't show the complete path to the file. (I'm talking about Internet Explorer click View, click source code.)
1
6344
by: goRide | last post by:
Hi, I'm looking of a way (preferred - a ready class or dll) to customize the context menu. many application has more controls inside the context menu (like textbox, sliders, checkbox, panel etc'). is there a way making this without writing my own context menu (meaning, popup form or something) ? Please don't post commercial products to this topic thanks.
1
2168
by: Anthony | last post by:
Below is a script I found at http://javascript.internet.com/ for a cascading menu. The script works great but there is one thing that I would like modified. BecauseI am just learning javascript, I did not want to try to modify the code without a little help. When you place the mouse over the menu bar, this script calls the function to show the menu. I would like it modified to hide the menu when the mouse is removed. Please help. The...
2
5911
by: MCM | last post by:
I'm working on a plotting control. The plotting control will have a context menu with basic commands for "scaling", "zooming", etc. Is there a way that, from the parent form, I can add more commands to the control's context menu? I'm envisioning a case where the control has a set of context menu items, and the parent form also has a set of context menu items. Thanks.
1
5259
by: =?Utf-8?B?QW5kcmV3?= | last post by:
Hi, friends, I am using C#.net 2005 to create a windows application. It has menu items, such as File, etc. Under File, there are more menu items, such as New Files, Working Files, etc. Under New Files/Working Files, there are more sub menu items, respectively. All those menu items are enabled at beginning.
0
9697
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10587
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10649
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10295
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7018
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5682
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5867
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4487
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3136
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.