Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Menu Shortcut?


I am still relatively new to VB and I have a question regarding Menus.

Currently, I am working on an application that has about 20 Forms and I want to use the same Menu for each Form. I've done about three and have realized that this will set me at least a week back on my project because it is a fairly detailed Menu.

Please tell me there's an easy way to use the same Menu in every form without manually entering everything!




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
F1 Menu Shortcut
Hello,
Anybody is aware if the F1 key ( as menu shortcut ) has some troubleshooting in different environment ? For one of my large distribution applications, it seems not to work on some specific machines...Anybody has a clue ?
Thanx

Menu Shortcut Key!
The "File" menu in a web browser project has a sub-menu "New" named mnuNew. "New" also has a sub-menu that shows 2 options - "Window" named mnuNewWindow & "Message" named mnuNewMsg. Clicking "Window", as usual, opens a new instance of the browser & clicking "Message" opens the "New Message" window of the default mail client for the user to send a mail. Ctrl+N has been assigned as the shortcut key for "Window" & Ctrl+M has been assigned as the shortcut key for "Message" in the menu editor in the VB IDE (somewhat similar to the File--->New menu in IE).

Now what I find is if I press Ctrl+N on the keyboard, strangely my system's C: drive opens up (C: & not any other drive maybe because of the fact that the project resides in C:) but there's no such problem when Ctrl+M is pressed on the keyboard.

I changed the shortcut key of "Window" to, say, Ctrl+Q. Now when I press Ctrl+Q on the keyboard, then a new browser window opens up. I even tried other shortcut combinations & all of them open a new browser window. The problem is only with Ctrl+N.

What's causing this problem? How do I overcome it?

Of course, I can assign any other shortcut to "Window" but since Ctrl+N has been the universally accepted key combination to open a new instance of an app, I did like to adhere to this combination.

Menu Shortcut
Is there anyway I can change the shortcut key of a menu by programmation. I have two Find menu wich are never displayed at the same time, but VB won't let me put the same shortcut(Ctrl-F) two times. Thanks

Shortcut-Menu Key
Does anyone know how to program the ShortCut-Menu key on that is next to the Right Ctrl key on the stard keyboard?

F10 Shortcut On Menu
Hi:
I need to add a menu item with the shortcut F10. But apparently there is no combination of F10(F10 / Shift + F10 etc) available on the menu Item dialog box.
Is there a workaround to this problem?

Shortcut Menu
I added a menu to the shortcut menu. For example, I can right click on a word to run a macro. It works fine, but when the word is misspell the shortcut disappear. I want to know how can I make it active even when the word is misspelled?

Thank you

Shortcut Menu
Hi,

How do I create a shortcut menu for a control which will show on right button click.

Thanks.

Lalchak.

Menu Option Shortcut
I've got a menu option with the keyboard shortcut as ctrl + alt + a, which isn't an option on the standard menu editor. Is there any way for me to have it display the ctrl+alt+a in line with the other menu options that are displayed with the menu editor?

Many thanks in advance.

Menu Shortcut Error
http://www.altocircuito.andremedeiro...stuff/menu.JPG

Can you tell me what is wrong? because for some reason, the key combos don't work :S it does nothing

P.S: if you click on them normally using the mouse they do work as they all have commands

How Can I Add Shortcut To A Menu By Code ?
Dear Sir,
How can I add shortcut to a menu by code ? I need to do this in a program. Thanks.

How Can I Dynamically Set A Shortcut In A Menu ?
Hello,
I want to dynamically set a shortcut in a menu. Ex.
When I click a button, I set a "Ctrl-A" to show a message. Is this possible ?

Can I Set A Menu Shortcut Key At Runtime
I have a tabbed form with tabs showing contact and address information respectively. There's a menu for each of the tabs which I enable/disable according to which tab is selected. The menus both contain all the same actions as each other.

Trouble is, when I come to assign shortcut keys I want to assign the same keys to both menus - since all the actions are the same and only one menu can be enabled at a time I think this would be fairly instictive for the user- but I can't do that at design time because the editor will only let me assign a given shortcut key once.

So is there a way I could reassign the shortcut keys when the user clicks between tabs? Or any other suggestions?

nb (to pre-empt an unwanted suggestion) I don't want to merge the menus into one because I think the user might find that confusing. Having both menus there lets them know they can act on either contact or address info and teh fact they've dropped down that menu should give them the confidence they're acting on what they think they are.

Any suggestions?

Assign Shortcut Key With Menu API
Hi,

I am creating my main menu at runtime using the CreateMenu and AppendMenu API.

I've run into a problem. How can I add a shortcut key to a menu item that is added through these API functions???

Shortcut Menu Question
In Excel is it possible to create a shortcut menu for when I right click on a certain worksheet I will get that custom shortcut menu to show?

Menu -> Shortcut Property...
Hi all,

how can I set the shortcut of a menu to ESC ?
The thing is that ESC is not in the shortcut list of the menu editor...and is not in the properties list of this control !


Thanks

Setting Menu Shortcut To ESC Key
How can I set a shortcut on a menu to the ESC key?  It does not seem to be an option in the list of available shortcuts.



Menu Shortcut Keys
I have a vb6 app which contains menus setup in design mode. I may, at certain
points, require the existing menu to be sub-classed for different functionallity.
Sub-classing the menu and giving the appearance of the old menu (same caption
and position) is no problem. But if the old menu has a shortcut key associated
with it, and i subclass, then the user presses the shortcut combination,
the OLD menu code is called!! How do i get the existing shortcut key for
a menu and assign it to my subclassed menu?

Menu Shortcut Keys
I have a vb6 app which contains menus setup in design mode. I may, at certain
points, require the existing menu to be sub-classed for different functionallity.
Sub-classing the menu and giving the appearance of the old menu (same caption
and position) is no problem. But if the old menu has a shortcut key associated
with it, and i subclass, then the user presses the shortcut combination,
the OLD menu code is called!! How do i get the existing shortcut key for
a menu and assign it to my subclassed menu?

Assining 2 Shortcut Keys To The Same Menu
Greetings all!

Just want to know how could I assing 2 shortcut keys to the same menu item.

I tought about putting some code in the "KeyDown" event, but I am using MDIForms and this event is not there in the main MDIForm.

I also subclass the main MDIForm and try to catch the WM_KEYDOWN and WM_KEYUP message, but nothing happens.

Please help me on this.

Thank you and have a nice day!

Menu Shortcut Not Displaying In Windows XP
I have recently purchased a new development computer with Windows XP. My old application, developed in VB6, no longer displays the underlined shortcut character, as created in the Menu Editor. In design mode, it is still there, but doesn't display at runtime. I've installed Windows XP SP1a and upgraded VB to SP5, but to no avail. Any ideas?

Right-click Shortcut Menu Has Vanished
Edit by Moderator:
RE: http://www.xtremevbtalk.com/showthread.php?t=193589

The original thread was over 1 month old and therefore it is archive-only.

Please create your own thread in future.


Quote:





Originally Posted by Mike_R


Yeah, this is correct, at least by my testing, I agree.

I've seen members have this happen to them though: play around with the toolbars and then "Oops!". Perhaps their Workbook_BeforeClose() event failed to fire for some reason?? I really can't say. It does not make a lot of sense to me, but I'm pretty sure I've heard of this. (Didn't this happen to Gunslinger at one time... I don't remember for sure.)

The point is that this is a possibility worth considering. Once this happened to Gunslinger (or whomever it was) it was really a bear to get up and running again as the entire Excel.xlb was now saved in a really bad state. Not-unfixable, mind you, but if this happens to a Client their Excel system really will be paralyzed until you can walk them through a solution...

But, as you say, Greychild, this "crash" situation should be relatively hard to accomplish I think.





Just found this old thread during a search, and thought i'd add some info
yes it was me that had this happen, and he's right its a pain to recover from, now, what i did was disable each menu individually then re-enable them at close one at a time, so if it crashed, which it did once, it would re-enable them by opening and closing the workbook again, this doesnt help much with custom stuff however.

so what i did was come at it from a different angle, and before my workbook opens fully, it does a system sweep for the xlb file, it then moves it and then disables the menus, then on close i return the xlb file, this way if it screws up, then excel will re-create the xlb file automatically with the default m$ menus and settings, thus never leaving you with no menus.

the time my early workbook crashed (system power twitch caused a blue screen ) the user reported "odd looking excel" to the tech section, who spent nearly 10 hours over 2 days trying to get it fixed, and all they managed was one little custom menu (which was quite impressive actually!) i heard through a friend of this and went to see them, told then the menus were all disabled thats why he couldnt find them, then fixed it in about 30 seconds, dam was he ****ed !!

Right-click Shortcut Menu Has Vanished
Shortly after testing some VBA code, I discovered I have lost the right-click shortcut menus in Excel 2003.

The VBA code I was testing:
(1) looped thru all my CommandBars [For Each objCBar in CommandBars],
(a) writing the Name, NameLocal, Enabled and Visible property
values of each CommandBar to a worksheet (facilitating
restoration, I had hoped), and then
(b) set each CommandBar's Enabled property = False;
(2) set four ActiveWindow properties = False:
.DisplayHorizontalScrollBar,
.DisplayVerticalScrollBar,
.DisplayHeadings,
.DisplayWorkbookTabs;
(3) set two Application properties = False:
.DisplayFormulaBar,
.DisplayStatusBar;
(4) and finally set the Application.DisplayFullScreen property = True.

Satisfied with the results (examined "during" a breakpoint), I ran the remaining code which, presumably, restored the "original" settings.

Any ideas would be appreciated. Probably obvious is that I want the shortcut menus back, but if you can diagnose the pathology as well, I'd be very grateful!

Two Keyboard Shortcut For One Menu Item
Hi !
I mean, is it possible ?
I would like to assign two keyboard shortcuts to one of my menu item ( via menu creation )
Thanx !

Shortcut In The Start Menu Without Installation...
Hi again all,

How do I go about getting a shortcut placed in the Start menu without using an installation package? e.g Start -> Programs -> Project1 -> Project1.exe

P.S. - All PC's are on WinXP Pro.

Form Menu Shortcut Keys
Hi, Ive been using the menu editor to add shortcut keys to menu items but i would like to add some extra combinations that arnt on the list such as Shift+Ctrl+S. I was thinking about using either Form_KeyPress or GetAsyncKeyState() to run the menu item's click event but how would i add the key combination to the menu item? Normally you get the text on the left and the shotcut keys on the right. Is it possible to add it in?

Is there a better way to raise the events than Form_KeyPress and GetAsyncKeyState()?

Checking For A Shortcut In The Start Menu
How can i check if a specific shortcut exists in the windows' start menu?
Checking if the shortcut file exists with the FileSystemObject just doesn't work in the start menu's folder.

Shortcut Key Not Working In Menu Item
Hello,

If I add an ampersand (&) to the front of a menu item using the VB menu editor, in design mode, the menu item caption has an underscore (_) underneath the first character. But when I go to run the project, the underscore is gone and the shortcut key doesn't work.

Does anyone have any idea what I'm missing ?

Thanks.

Using Shortcut Keys Not Available In Menu Editor
Is there any way to get access to shortcut keys that are not available from the list in the Menu Editor?

Do I need an API or subclassing or something?

I suppose I could just catch the keys myself, but then how would I display which key does what in the menus?

Can I Define A Custom Menu Shortcut?
The program I am working on has a few keystrokes that make using it easier. I'd like to list these in my menu beside the actual menu item. The problem that I have is that VB limits my choices for shortcuts, and I can't use 'space', 'period', 'left', etc. Does anyone know if I can something other than what VB allows in the menu editor?

How To Add A Program Into Explorer's Shortcut Menu?
I have a small VB6 program (standard EXE) that I would like to put into Explorer's shortcut menu. It should work something like WinZip, where you right-click on some selected files and you'll see an option in the shortcut menu that allows you to do something to those files with your own program. Right now the program does not accept parameters. I have no idea yet how to do that because the parameter could be a file, a folder or a mixture of them.

Can someone give me an idea on how to do this, hopefully without having to rewrite the whole thing?

Thanks.

Altering Shortcut Keys In Menu
I have a menu set up using the menu editor and have a shortcut key for one of the items of F6. I need to change this at run time to remove the F6 shortkey in certain circumstances.
Anyone know how to do this ?

cheers

Problem Regarding Shortcut Menu... Pl. Help (eloborated)
Hi everybody,

Can anybody help me. My problem is :

I have opened a modal from from a shortcut menu. I want to show a shortcut menu on the newly opend form. Please take me out of this hell....

Let me explain my prob. in detail....

I have a shortcut menu on a form. On click event of a menu item I have opened a Modal form. Now the event procedure of the menu item is not completed yet.

Now, on the form (which I had opened from the popup menu) I want to show a popup menu on right click of a grid, but that menu is not showing...

If this info is not wnough then I can send it in more details...

thanks in advance...

regards

Mohit Rohella

Add An Uninstall Shortcut To Start Menu
Hiya,

How do you add an uninstall shortcut to the Start Menu in the same program group as your application after it has installed.

This would be part of the installation process of course.

I'm using P&D wizard

sounds easy enough to program, but there must be a nice simple way of doing it?

Adding A Shortcut To Start Menu
C:WINNTProfilesglbertagStart MenuProgramsmyprogramgo.lnk

lets say my program needs to add that to the current users start menu.. whats the code line?

C:WINNTProfiles????????Start MenuProgramsmyprogramgo.lnk

Thanks

Ctrl+<Enter> Menu Shortcut
Can anyone tell me how I may use a ctrl+<Enter> as a shortcut for a menu item on a secific form?

I see that there are many other combination of keys strokes but not one for the ctrl+<enter>


Thanks
Marc

Tray Icon Shortcut Menu
How can I create a program that launches a window,
runs through a dialog and then closes the window and runs
in the background. I'd like to have application controls
through the use of the System Tray Icon and a shortcut menu
launched from it!

Tips? Pointers? Examples?

Thanks in advance... -Serp

Shortcut Menu In A Msflex Grid
Hi,
Is it possible to have a shortcut menu (pop-up) to be activated in a msflex grid??

If so, how??

Your help would be much appreciated.

thanks team

Menu Shortcut Keys At Runtime
Does anyone know if VB6 allows you to change menu shortcut keys at runtime? It seems to be possible from VB .NET, but I can't figure out how to do it in VB6.

I have a menu item with a shortcut of Ctrl-O that I'd like to change based on the MDI Child being viewed. VB's Help lists the menu shortcut constants (which they also label accelerator constants) so I'm led to believe it's possible -- mnuFileItem.Shortcut = vbMenuAccelCtrlA doesn't work, though.

The following URL shows how to do it from VB .NET
http://msdn.microsoft.com/library/d...nFormsMenus.asp

Thanks!!

Custom Shortcut Menu In Access97
Hey gang,

I have a TreeView control on an Access form. I need a custom popup shortcut menu to appear when the user right clicks. I can handle the mousedown event properly (the TreeView doesn't seem to have a ShortcutMenu property, so I have to manually prompt it in the MouseDown event), but for the life of me I can't get the shortcut menu to come up correctly.

I've tried using the Menu Builder, but the top-level menu item is always displayed even when I have the menu set as a popup. Example,

&Edit
--&Properties
--&Cut

The "Edit" gets displayed, but all I want to see are the "Properties" and "Cut" like a normal shortcut menu. Am I daft? I tried doing this in code with the CommandBars collection, but couldn't even set the "popup" style of the menu - all I can get is a normal menu or a toolbar so far.

Can anyone PLEASE help me?

Change Shortcut Of Menu Item
I want to change the shortcuts of menu items programatically. I read in the online help that this is not possible. Does someone know a way, how I can nevertheless manage to change shortcuts?
Thanks
Robert Maier

Menu Shortcut Key Problem, SendKeys Bug
Hi,

1) I've created a word-processor where there's a Paste command in the Edit menu with Ctrl+V for shortcut. This command gets the Clipboard text and puts it in a RichTextBox. However, since Ctrl+V is a Windows shortcut, pressing Ctrl+C in the apllication pastes the Clipboard text twice. That is, suppose I copied/cut "text", and then pressed Ctrl+V. The "text" is pasted twice (as "texttext") in the text box. One way to get around this is to put no code for that command, or to put no shortcut keys. Anyone knows how else I can get around this?

2) I tried using SendKeys("{CAPSLOCK}") to generate the CapsLock press event on a form (it had a text box on it). It didn't work, and I couldn't generate NumLock press either. Can someone tell me how to send the CapsLock/NumLock Key-press to a form?

Thanks in advance for your help.

Create An Uninstall Shortcut In Start Menu Using VSI
How Do you Create An Uninstall Shortcut In Start Menu Using VSI?

Also are there any templates availible for VSI?

Thank You,

Creating Shortcut In Right-click(popup) Menu
hi,

How to pin the shortcut of my application to right-click(popup) menu.Similar to winzip

which will be displayed in popup menu. This is should be done while installation. So,

what are the changes to done to setup.lst file.

Any sort of help is appreciated.

M.L.Srinivas

Adding Ur Shortcut To Windows Right-click Menu
hi guys,
I want a shortcut to my application in right-click popup menu on the desktop as long as user wants ie. he can create or delete whenever he/she wants.

Customise Popup Menu On Desktop Shortcut
I am trying to customise the right mouse click popup menu on a desktop icon/shortcut eg remove delete option or add other relevant option for that associated program. Any assistance would be appreciated.

How To Add Shortcut Menu To Rich Text Box (like In TextBox)?
Hi all,

How can I get the shortcut menu (the small pop-up window with undo, cut, copy, paste, delete & select all) to appear with a RichTextBox control just as it does with the regular text box control?

The pop up menu appears when you press the right mouse button on a right-handed mouse (the left button with left-handed). It appears to be automatic when using the normal TextBox control, but not with the Rich Text Box.

Any and all tips, tricks, & advice are welcome. Thanks! peace!

Thank
You
Have
A
Nice
Day

[b]how To Disable Webbrowser Control's Shortcut Menu?[/b]
hi,
i'm using WebBrowser control in my application and i want to disable its shortcut menu.

i could not find any method or property of webbrowser control to do this.

any tip or help to do the task is welcome.
thanks in advance.


Howto Add Shortcut To ..All UsersStart Menu In Win2K?
Hi,

Under VB6 and Win2K platform, how do I add a shortcut for my program to
the All Users StartMenu?
(Path = C:Documents and SettingsAll UsersStart Menu)


Many Thanks,
Regan

Creating Shortcut In Right-click(popup) Menu
hi,

How to pin the shortcut of my application to right-click(popup) menu.Similar to winzip

which will be displayed in popup menu. This is should be done while installation. So,

what are the changes to done to setup.lst file.

Any sort of help is appreciated.

M.L.Srinivas

Copyright © 2005-08 www.BigResource.com, All rights reserved