Click here to Skip to main content
15,883,901 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
VB
Richtextbox1.font.size = (+1)


code don't work?????
I want to add this to my text editor but how?
Also please don't make the code as new font... and make it keep so it will keep the Font Style.
please help me, please :)
Posted
Updated 18-Jul-22 14:01pm
v4
Comments
Sergey Alexandrovich Kryukov 11-Dec-11 0:50am    
Are you serious? If you said it's a pseudo-code...
--SA
Sergey Alexandrovich Kryukov 11-Dec-11 0:52am    
And what's the type of your rich text box? Do you think there is only one?
--SA

1 solution

Try this code it's 100% working :)
VB
RichTextBox1.Font = New Font(RichTextBox1.Font.FontFamily, RichTextBox1.Font.Size + 1, RichTextBox1.Font.Style)

I hope it will solve your Problem.
 
Share this answer
 
v2
Comments
Mathsquare 11-Dec-11 0:45am    
Thanks but can you make it so it will keep the font Style.
Sergey Alexandrovich Kryukov 11-Dec-11 0:58am    
Yes, the answer is not perfect, but what about you? What makes it so difficult to look at the Font help page and use another constructor? Spend just a minute to solve you own problem.
--SA
Manoj K Bhoir 11-Dec-11 0:57am    
See this :

RichTextBox1.Font = New Font(RichTextBox1.Font.FontFamily, RichTextBox1.Font.Size + 1, RichTextBox1.Font.Style)
Sergey Alexandrovich Kryukov 11-Dec-11 1:00am    
Exactly. Do use a favor, move it to the body of your answer, just to justify my vote of 5 I gave you in advance. :-)
--SA
Manoj K Bhoir 11-Dec-11 1:04am    
Thanks SAKryukov for Suggestion and your 5! :)

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