Changing the font of a String*

Hi,

Could you please tell me how to change the font of a String*

Is it possible to set subscript font to the name of a button

Is it possible to set subscript or superscript for a String*

Using which Class or Method to set subscript or superscript for a String*

Thanks a lot.


Answer this question

Changing the font of a String*

  • Stephen Turton



    Dim MyFont As New Font("Arial", 14, FontStyle.Bold, GraphicsUnit.Point)

    Me.Button1.Font = MyFont

    Me.TextBox1.Font = MyFont



     


  • Noob WF help Needed

    Hi, Dman1,

    Thanks.  However, my question is to change part of the button text into different fonts.  In C++, it is also easy to render the whole text using different fonts.  However, it is not so easy to define Cp, where C is normal and p is a subscript.



  • Gary Miller

    Thanks a lot.

    However, if not in the RichTextBox, is it possible to render the title of buttons as a supercript or subscript   I mean to render parts of the text as different fonts.

    Regards,

    /Roger



  • Benny Tops

    In both cases, you need to owner draw your control.  There are no super and subscript fonts, AFAIK, you need to take a smaller font and draw it in the right position.


  • Shapid

    A string does not have a font.  The font is defined when you render the string, not in the string itself.


  • Changing the font of a String*