Click here to Skip to main content
15,900,598 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to change righttoleft property of a vb.net form at runtime. When I try the code me.righttoleft=ture. but nothing happening. It is working fine when I do this at design time. Anybody can tell me how to do this...
Posted
Updated 24-Sep-11 23:18pm
v2

1 solution

You have to set the RightToLeftProperty to Windows.Forms.RightToLeft.Yes and the RightToLeftLayout to True.
The first will make your Form read from right to left (the Form Caption) and the latter makes the Controls on your Form go from left to right. RightToLeftLayout[^] only works when RightToLeft[^] is Yes or through Inherited on Yes.
 
Share this answer
 
Comments
Mehdi Gholam 25-Sep-11 4:40am    
You would probably need a Form.Invalidate() also.
Sander Rossel 25-Sep-11 5:08am    
Nope, not needed. At least not when I just tried it :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900