Thursday 10 December 2015

Common dialog control- Font and Color Dialog in Visual Basic 6.0

Visual Basic 6.0 Tutorial:Working with Common Dialog Control and its different Dialogs i.e Open,Save,Color,Font,Print and Help.
Video tutorial is focused on following points:
1.How to add Common Dialog Control 6.0 into VB form.
2.How to use different dialogs (Open,Save,Color,Font,Print and Help) with this control.
3.How to use different methods /Actions to invoke a particular dialog.
4.How to work with Font Dialog  and its different flags in detail.
(How to add specific fonts and Style,effects .colors ,Help to font dialog and how  to make them functional with code.)
5.How to work with Color Dialog and its different flags in detail.
(How to add different color options (Custom colors,Full Colors,Disable custom color)onto the color dialog and use them with text and background etc)



Source Code:
For Color Dialog Button
Private Sub colorbtn_Click()
On Error GoTo errorfix
dialogtest.Flags = &H1
dialogtest.ShowColor
Form1.BackColor = dialogtest.Color
errorfix:
End Sub
For Font Dialog button
Private Sub fontbtn_Click()
On Error GoTo errorfix
dialogtest.Flags = &H3 Or &H100 Or &H4
dialogtest.ShowFont
txtsample.FontName = dialogtest.FontName
txtsample.FontBold = dialogtest.FontBold
txtsample.FontItalic = dialogtest.FontItalic
txtsample.FontSize = dialogtest.FontSize
txtsample.FontStrikethru = dialogtest.FontStrikethru
txtsample.FontUnderline = dialogtest.FontUnderline
txtsample.ForeColor = dialogtest.Color
errorfix:
End Sub


for more Visual Basic tutorials,please visit
Youtube Channel:https://www.youtube.com/user/sandydehrian
Computer Gyan Blog:http://selfcomputerlearning.blogspot.in/

1 comment:

  1. Sir, In my visual basic interface dialogue box option is not showing in components

    ReplyDelete