Solved

Underline in menus?

Posted on 2001-06-20
11
168 Views
Last Modified: 2010-05-02
Hello!
How do I make an area with dropdownmenus, ie. like the menu in VB - File Edit View..... etc.

All these menucaptions is placed in a sort of 3D frame, but i cant place a frame up there !

Take a look at this screendump here: http://bobstar.subnet.dk/_76933.html

Hope you can follow me :O)

Regardz
Janus
0
Comment
Question by:Janus007
  • 2
  • 2
  • 2
  • +4
11 Comments
 
LVL 50

Expert Comment

by:Ryan Chong
ID: 6209859
In the menu caption add the & character

menu1.Caption = "&View",

menu2.Caption = "View && Edit"
0
 
LVL 50

Expert Comment

by:Ryan Chong
ID: 6209865
or menu1.Caption = "-"

Or maybe i guess wrong for what you want.
0
 
LVL 5

Expert Comment

by:GeoffKell
ID: 6209929
Use the menu editor inside VB. It's a bit of a pain to use but quite easy once you get used to it. Best to read about it in help.

The & character (as stated above) is used to indicate the keyboard shortcut.

Regards
GK
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 5

Expert Comment

by:GeoffKell
ID: 6209933
I should have mentioned that you call it up from the VB Tools menu (Menu Editor) or via Control-E.

GK
0
 
LVL 15

Expert Comment

by:ameba
ID: 6210046
With VB menus, you can have that 'Frame' effect. You can create 3D line under the menus:
1. by adding Toolbar control (Microsoft Windows Common Controls)

or
2. draw line or use 2 Line controls on your form:

' Form1, create menu, add 2 Line controls
Option Explicit

Private Sub Form_Load()
    With Line1
        .X1 = 0
        .X2 = 20000
        .Y1 = 0
        .Y2 = 0
        .BorderColor = vb3DShadow
    End With
    With Line2
        .X1 = 0
        .X2 = 20000
        .Y1 = 1 * Screen.TwipsPerPixelY
        .Y2 = 1 * Screen.TwipsPerPixelY
        .BorderColor = vb3DHighlight
    End With
End Sub

Note:
Please, do not 'accept my comment as answer' if it is not for A grade.
0
 
LVL 15

Accepted Solution

by:
ameba earned 50 total points
ID: 6210049
>With VB menus, you can have that 'Frame' effect
should be:
With VB menus, you CANNOT have that 'Frame' effect
0
 
LVL 4

Expert Comment

by:amit_panjwani
ID: 6210697
why dont you use coolbar instead ?
coolbar coupled with Toolbar ( buttons with menus give you very much the same effect)

0
 
LVL 22

Expert Comment

by:rspahitz
ID: 6211239
After you get the underlined items using the "&" prefix on the letter/number of your choice, you may notice that Win2000 won't display it!

Also, it turns out that Win2000 has decided that if you use the mouse, you don't need the keyboard shortcut, so it won't display it until you press the Alt key.
0
 

Expert Comment

by:nomulap
ID: 6211385
Janus,

Have you ever used Menu Editor in VB?
0
 

Author Comment

by:Janus007
ID: 6212465
0
 

Author Comment

by:Janus007
ID: 6213364
well it seems like i found out by myself :O)

http://www.vbaccelerator.com/ has an excellent ComCtl32 - i will use that!

I thank all of you for your postings!

Kind regards
Janus007


ps: ameba nealy hitted my wish, so therefore......
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

832 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