// Change the button1's font using ToFont with the specified font size.
private void ToFontWithSize(object sender, EventArgs e)
{
FontInfo selectedFontInfo = (sender as GcFontPicker).SelectedFontInfo;
this.button1.Font = selectedFontInfo.ToFont(11f);
}
' Change the button1's font using ToFont with the specified font size.
Private Sub ToFontWithSize(ByVal sender As Object, ByVal e As EventArgs)
Dim selectedFontInfo As FontInfo = TryCast(sender, GcFontPicker).SelectedFontInfo
Me.button1.Font = selectedFontInfo.ToFont(11.0F)
End Sub