DiigIT | IT Community
No Profile Image
Welcome Guest
New User? Register | Login
DotNet
IT Tags

Use of font dialog box and colour dialog box

By: rekha singh | 29 Apr 2010 1:24 pm
Use of font dialog box and colour dialog box
 
  • Create new project and add a form.
  • Drag and Drop two command buttons and a Label to the form.
  • Then drag & drop a FontDialog and a ColorDialog to the form.
  • Change the Name property of the buttons & Label as cmdFont, cmdColor and lblShow.
  • Change the Text property of the buttons & Label as Change Font, Change Color and Show
  
 
  • Double click on the change font button. write the following two lines.
 
FontDialog1.ShowDialog()
lblShow.Font = FontDialog1.Font
 
  • Double click on the change Color button. write the following two lines.
 
ColorDialog1.ShowDialog()
lblShow.ForeColor = ColorDialog1.Color
 
  • Run the Application by clicking at > or by pressing F5. Click on button and change fonts and colors.
 
 
 

Comments

No Comments Posted for this Article.

Leave a comment

Enter the text in the image
img
Can't read?
Type the characters you see in the picture below.


Close Move