i need to make a theme form, chossing two colors, and make them in all of the project forms using this code maybe:

Sub RepaintForm()
grbrush = New System.Drawing.Drawing2D.LinearGradientBrush(New Point(0, 0), _
New Point(Me.Width, Me.Height), x, y)
Me.CreateGraphics.FillRectangle(grbrush, New Rectangle(0, 0, _
Me.Width, Me.Height))
End Sub
Private Sub frmThemes_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
RepaintForm()
End Sub

Member Avatar for iamthwee

I don't think you need themes. The whole dotnet thing is bloated enough, no need to add to that by having each frame rendered as your own theme.

You can just type that code into a class file and whenever a new form is created just call the class file in the load event. This should do it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.