Creating font dialog box:-
We can create the font dialog box using following syntax. But before you need to install the font by code in your project.
Installing font syntax :-
Commondialog.flags=cdlcfboth
Or
Commondialog.flags=cdlcfscreenfont
Creating font dialog syntax:-
Commondialog.showfont
Example:
Private Sub cmdfonts_Click()
cdc.Flags = cdlCFScreenFonts
cdc.ShowFont
End Sub
Using Fonts effects from Common Dialog box:-
Syntax:-
Textbox.property=cdb.property
Creating save Dialog box:-
To create the save dialog box use the following syntax:-
Commondialog.showsave
Naming to Dialog Title:-
You can change the name for dialog box as below:-
Commondialog.dialogtitle= "Name"
Creating open dialog box:-
To create the open dialog box we use the following syntax:-
Commondialog.showopen
Filter Method:-
To work with the particular file types we need to filter the file’s types. Filtering syntax:-
Commondialog.filter= "allfiles(*.*)|*.*|(*.jpg)|*.jpg|"
Saving picture:-
Syntax:-
Savepicture picturecontrol.picture,filename
Example:-
Private Sub cmdsave_Click()
cdc.DialogTitle = "My Nepal save box"
cdc.ShowSave
fn = cdc.FileName
SavePicture imgopen.Picture, fn
End Sub
For Further Reading,

0 comments:
Post a Comment