Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom Theme
#4
Well for something like that you are going to use the VB.NET Graphics object in order to actually draw things directly onto your forms and panels. So, for example, if you wanted to draw a red rectangle on a form, you would need to get a graphics object in order to draw the rectangle. This can be done in some way like this:
[code2=vbnet]Dim g As Graphics = Me.CreateGraphics()
'We can now use "g" to draw anything
'Let's first set everything to red
Dim myBrush As New System.Drawing.SolidBrush(System.Drawing.Color.Red)
g.FillRectangle(myBrush, New Rectangle(0, 0, 200, 300))
myBrush.Dispose()
g.Dispose()[/code2]

The above code creates a graphics object that gets its ability to draw directly from the form, meaning that it will draw directly onto the form. We then set its color to red using a "SolidBrush" object and are able to fill a rectangle by calling the "Fill Rectangle" method. In order to create some sort of gradient effect, this can be done in changing colors while moving down the form using a For Loop or something to the same effect.
My Blog | My Setup | My Videos | Have a wonderful day.


Messages In This Thread
Custom Theme - by Cecilio - 06-13-2013, 11:47 PM
Re: Custom Theme - by brandonio21_phpbb3_import2 - 06-19-2013, 11:55 PM
Re: Custom Theme - by Cecilio - 06-23-2013, 02:57 AM
Re: Custom Theme - by brandonio21_phpbb3_import2 - 07-05-2013, 03:10 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Custom Webbrowser Component vbcodegeek 2 11,515 07-12-2011, 03:56 AM
Last Post: vbcodegeek

Forum Jump:


Users browsing this thread: 1 Guest(s)