Mega Code Archive

 
Categories / VB.Net by API / System Windows Forms
 

FontDialog ShowApply

Imports System.Drawing Imports System.Windows.Forms public class FontDialogProperty    public Shared Sub Main         Dim FontDialog1 As FontDialog = New System.Windows.Forms.FontDialog                  Dim objNewFont As Font         objNewFont = New Font("Verdana", 12, FontStyle.Underline)         With FontDialog1             .Font = objNewFont             .AllowScriptChange = False             .ShowColor = True             .Color = Color.Blue             .ShowApply = True             '.ShowEffects = False         End With         If FontDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then             Console.WriteLine(FontDialog1.Font)             Console.WriteLine(FontDialog1.Color)         End If    End Sub End class