Change button font at runtime

By Allen Stoner
INSTANTLY dtSearch TERABYTES OF POPULAR DATA TYPES; hundreds of reviews, etc.!

If you wish to change the font of the button at runtime, this is how to do it.

      Dim myFont As System.Drawing.Font
       If MakeBold Then
        myFont = New System.Drawing.Font("Microsoft Sans Serif", 8.25, FontStyle.Bold)
      Else
        myFont = New System.Drawing.Font("Microsoft Sans Serif", 8.25, FontStyle.Regular)
      End If
     Button.Font = myFont

Change button font at runtime  (526 Views)