Click here to Skip to main content
15,897,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

i am using font dialog box and saving its values in databases through access
my problem is i want particular font name from database to be selected when

fontdialog.ShowDialog(me) is called

say i have font in some variable which i retrieved from database
that particular font i want to be selected when fontdialogBox is called
Posted

1 solution

Create the font, using the Font class constructor[^] and pass it to the FontDialog, for instance:
VB
Dim fd As FontDialog = New FontDialog
fd.Font = New Font("Arial", 20)
If fd.ShowDialog() <> DialogResult.OK Then
  '...
End If
'...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900