- 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.
lblShow.Font = FontDialog1.Font
- Double click on the change Color button. write the following two lines.
lblShow.ForeColor = ColorDialog1.Color
- Run the Application by clicking at > or by pressing F5. Click on button and change fonts and colors.
No comments:
Post a Comment