Solved

Right-Justify Menu

Posted on 1998-05-06
10
359 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

785 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