954,551 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

themes

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

yaya_star
Light Poster
26 posts since Jan 2007
Reputation Points: 10
Solved Threads: 0
 

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.

iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
 

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.

arjunsasidharan
Practically a Posting Shark
826 posts since Aug 2006
Reputation Points: 347
Solved Threads: 13
 
bvvvb
Newbie Poster
2 posts since Nov 2009
Reputation Points: 10
Solved Threads: 1
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You