Solved

Right-Justify Menu

Posted on 1998-05-06
10
362 Views
Last Modified: 2006-11-17
How can I right-justify a menu in VB 5?
0
Comment
Question by:polygon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: 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 100 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] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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 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…

695 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