We need you!

We're working hard on the next version of Developer Fusion. Let us know what you think we should be up to!

Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

Rated
Read 11,678 times

Related Categories

VB.NET Stylise Your Forms like you would with CSS on a webpage - Code

phill64

Code

Sub Stylize(frm As Form)
 Dim Con As Control
 For i = 0 To frm.Controls.Count - 1
                Con = frm.Controls(i)
                If TypeOf Con Is TextBox Then Con.ForeColor = Color.Red
                If TypeOf Con Is Button Then Con.FlatStyle = FlatStyle.Flat
 Next
End Sub

This is just an example, setting textbox's forecolor to Red, and buttons style to Flat.

Comments