Set Properties for a FontDialog : FontDialog « GUI « VB.Net Tutorial

Home
VB.Net Tutorial
1.Language Basics
2.Data Type
3.Operator
4.Statements
5.Date Time
6.Class Module
7.Development
8.Collections
9.Generics
10.Attributes
11.Event
12.LINQ
13.Stream File
14.GUI
15.GUI Applications
16.Windows Presentation Foundation
17.2D Graphics
18.I18N Internationlization
19.Reflection
20.Regular Expressions
21.Security
22.Socket Network
23.Thread
24.Windows
25.XML
26.Database ADO.net
27.Design Patterns
VB.Net
VB.Net by API
VB.Net Tutorial » GUI » FontDialog 
14.71.3.Set Properties for a FontDialog
Set Properties for a FontDialog
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
14.71.FontDialog
14.71.1.Font dialog apply actionFont dialog apply action
14.71.2.Font dialog showing effectsFont dialog showing effects
14.71.3.Set Properties for a FontDialogSet Properties for a FontDialog
14.71.4.Get selected font from FontDialog
14.71.5.Use Font dialog to set Label fontUse Font dialog to set Label font
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.