Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom Theme
#1
Hey there i'm a an intermediate to almost expert programmer for vb.net but can't seem to get one thing down. I want to create a custom theme from code by adding a class. I have seen other you tubers do it but only get so far and stop uploading more vids. Please help

Cecilio
#2
By custom theme do you mean a custom theme for the Visual Studio IDE or for your application? If it's for your application, do you want to use custom images, etc, or simply custom colors?
My Blog | My Setup | My Videos | Have a wonderful day.
#3
Thanks for replying and its for your application using code to make simple gradients and other effects
#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.


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

Forum Jump:


Users browsing this thread: 1 Guest(s)