Develop An Application Using Color Dialog Control.
Develop An Application Using Color Dialog Control.
https://www.javatpoint.com/vb-net-font-dialog-box 1/11
4/21/24, 6:20 PM VB.NET Font Dialog Box - Javatpoint
Let's create a Font Dialog box in the VB.NET Windows form using the following steps.
Step 1. We need to drag the Font Dialog box from the toolbox and drop it to the Windows
form, as shown below.
https://www.javatpoint.com/vb-net-font-dialog-box 2/11
4/21/24, 6:20 PM VB.NET Font Dialog Box - Javatpoint
Step2: Once the Font Dialog is added to the form, we can set various properties of the Font by
clicking on the Font Dialog box.
https://www.javatpoint.com/vb-net-font-dialog-box 3/11
4/21/24, 6:20 PM VB.NET Font Dialog Box - Javatpoint
There are following properties of the Font Dialog Box in the VB.NET.
Properties Description
ShowApply The ShowApply property sets a value representing whether you want
to display the Apply button on the dialog box.
ShowEffects The ShowEffects property is used to set various effects on the text
such as strikethrough, text color, and underline options by setting
values on the FontDialog box.
Font The Font property is used to get or set the selected font to display
changes.
Container The Container property is used to get the IContainer that contains the
Component of the Font Dialog Box.
AllowScriptChange The AllowScriptChange property is used to set a value that allows the
user to change the character specified in the Script combo box to
show a character set other than the currently displayed character.
ScriptOnly The ScriptOnly property is used to set a value that allows the user to
select only the font, the character set of the symbol, and the ANSI
character from the dialog box.
https://www.javatpoint.com/vb-net-font-dialog-box 4/11
4/21/24, 6:20 PM VB.NET Font Dialog Box - Javatpoint
MaxSize The MaxSize property gets or sets a value that allows the user to
select only the maximum point size character.
Method Description
Equals() The Equals() method is used to check whether the current or defined
object is the same.
Reset() The Reset() method is used to reset all changes to their default values.
Dispose() The Dispose() method is used to free all resources used by the Control
or the component in the Dialog Box.
ShowDialog() The ShowDialog () method is used to run a common dialog box with the
default setting.
CreateObjRef() The CreateObjRef () method is used to create an object that contains all
related information to initialize a proxy that can communicate with a
remote object.
Events Description
HelpRequest When a user clicks the Help button of the dialog box, the HelpRequest event
is called.
https://www.javatpoint.com/vb-net-font-dialog-box 5/11
4/21/24, 6:20 PM VB.NET Font Dialog Box - Javatpoint
Apply When a user clicks on the Apply button of the Font dialog box, an apply
event occurs.
Let's create a simple program to display the Font dialog box in the VB.NET Windows Forms.
FontDialog.vb
https://www.javatpoint.com/vb-net-font-dialog-box 6/11
4/21/24, 6:20 PM VB.NET Font Dialog Box - Javatpoint
Output:
Select the string and click the 'Change Font' button; it opens the Font window. In the Font
window, we can change the size, font, and font style of the selected string.
https://www.javatpoint.com/vb-net-font-dialog-box 7/11
4/21/24, 6:20 PM VB.NET Font Dialog Box - Javatpoint
After setting the font, font style, size, and color, etc. on the Font dialog box, it shows the
formatted string, as shown below.
← Prev Next →
https://www.javatpoint.com/vb-net-font-dialog-box 8/11
4/21/24, 6:20 PM VB.NET Font Dialog Box - Javatpoint
Feedback
Preparation
https://www.javatpoint.com/vb-net-font-dialog-box 9/11
4/21/24, 6:20 PM VB.NET Font Dialog Box - Javatpoint
Company
Interview
Questions
Company Questions
Trending Technologies
B.Tech / MCA
https://www.javatpoint.com/vb-net-font-dialog-box 10/11
4/21/24, 6:20 PM VB.NET Font Dialog Box - Javatpoint
https://www.javatpoint.com/vb-net-font-dialog-box 11/11