• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

some simple vb

Journer

Banned
ok, i've scoured the properties window, checked all the dot operations and cannot figure out how to do two things for my program:

text captions: you know, hover over something and a caption pops up
alt cmds: alt+x usually closes a program. I want to link this to text in my buttons..

this is vb.net under vs2008

i just need to put some caption on some picture boxes and some captions and alt cmds on a few buttons...
anyone got some ideas? i've googled and even resorted to the built in help but nothing is giving me the answers i need :/
 
For the tooltips you need to add a ToolTip form element. It won't get a place on the form, just shows up on the bottom pane of the designer. Once you have the ToolTip on there, you can view the properties and change what you need. Then just find the form element you want the ToolTip to be on and change the 'ToolTip on ToolTip1' property to the text you want to show. You can reuse the ToolTip on multiple form elements with different Text for each one. The ToolTip object simply describes the style of tooltip to show.

For the commands, just right click on your menu item you want to bind and view the properties. You are looking for the ShortcutKeys property.

If you want to bind keys to the actual drop down menus, you just need to put an & before the letter you want to bind in the menus Text. That will automatically make it respond to alt^F for the File menu.
 
working on the tooltip thing

however, i can't seem to find the proper shortcut keys property you are looking for. if it matters, these are buttons, not menu items. I've looked under the advanced sections of application and data bindings but cant find anything relative
 
I believe you can only put the shortcuts on menu items. For what it's worth, you can have both the Menu and Button Click events handled by the same delegate so you are really only wasting form space and it's not much!
 
ok i figured out the alt-key thing. you have to turn usemnemonic property to true then put an & in front of the letter that will be your shortuct key

got the tooltips working too...thanks crusty!

edit:
yah, i would normally use a menu but this is a stupid CS project with dumb requirements. if we don't do it exactly following the rules they take off an assload of points >_<
 
Back
Top