Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Right-Justify Menu

Posted on 1998-05-06
10
Medium Priority
?
365 Views
Last Modified: 2006-11-17
How can I right-justify a menu in VB 5?
0
Comment
Question by:polygon
10 Comments
 
LVL 3

Expert Comment

by:MorFF
ID: 1442702
polygon,

Try putting a tab Chr$(9) in front of the text you want to justify.  It works for the top level drop down menu's. (like putting the help menu on the right)
I don't want to lock up you question as I've not tried it.  If it works, let me know and I'll submit it as an answer1

Cheers - MorFF
0
 
LVL 6

Expert Comment

by:clifABB
ID: 1442703
MorFF:
You should have submitted this as an answer.  It indeed works.  Although there is some space still on the right (which is reserved for the shortcut keys.)
0
 
LVL 3

Expert Comment

by:MorFF
ID: 1442704
ClifABB,

Thanks for your fairness!

Cheers - MorFF
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Author Comment

by:polygon
ID: 1442705
My menu is a toplevel, dropdown menu (created with VB built-in menu editor).

I've tried this code but still nothing happens.

Private Sub Form_Load()
   mnuHelp.Caption = Chr$(9) & "Help"
End Sub

0
 
LVL 3

Expert Comment

by:MorFF
ID: 1442706
polygon,

sorry, sent you down the wrong path there.  Try this;

   Form1.help.caption = chr$(8) + form1.help.caption

Should work! - MorFF   ;-)
0
 
LVL 2

Author Comment

by:polygon
ID: 1442707
I'm SorRy, but I still can't make it work.
Can you send me a project which has a right-justified menu to billy_man@hotmail.com ?

0
 
LVL 1

Expert Comment

by:MarkW
ID: 1442708
polygon, If you still need help whould you clue me in as to what you mean by right- justified. I tried the code offered and it worked for me.
0
 
LVL 2

Expert Comment

by:khaled022498
ID: 1442709
VB 5 supports something called bidirectional features that is if you are using a bidirectional Windows with bidirectional languge like arabic or hebrew to write from right to left all you have to do is to enable the RightToLeft prperty (Form1.RightToLeft = True)

now when you use any control over this form it will be supporting right to left, even the menues will be displayed from right to left.
this is how i understood your problem , i hope this will help you.
regards.
0
 
LVL 2

Author Comment

by:polygon
ID: 1442710
SorRy,
I don't think English is a bidirectional language.
The only thing I want is my Help menu to go to the right (below the minimize, maximize, close buttons).
0
 

Accepted Solution

by:
Darlof earned 200 total points
ID: 1442711
I assume you mean, "How can I right-justify a menu ITEM in VB 5?"
You cannot* place the Help menu to the right.
The reason for the responses that told you to put in a Chr$(8), is that this used to work.  That functionality was removed to force VB programmers to do their menues the 'correct' way (correct=Windows; having a menu to the far right is the Macintosh way)
[* Actually you can do this; but, it would be a huge amount of trouble, and I'm not sure you can do it with just VB.  If you have Win32 API experience, and are willing to expend a lot of effort on this let me know.]
0

Featured Post

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

886 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