VB 2008 Tutorial - GDI+ Gradient Colored Text Effect
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
Hi, Now i`m gonna show how to paint GDI+ Gradient Colored Text Effect in VB.NET, I made this tutorial too simple which first time users of VB.NET also can understand this tutorial!
Now add 1 PictureBox
Note: PictureBox is using to paint
Then add this Imports above Public Class Form1
You can change text, font styles, size, location and sizes in code Paint in Events of PictureBox
Figure 1 [Screenshot of Gradient Colored Text Effect]
![Image]()
*******************Thanks for reading my tutorial, I think this Tutorial will be most helpful to you!*******************
If you want any custom tutorial for you or you need any help in VS.NET, VB.NET, Software Coding, Designing and much more any help in Computer stuffs just ask me
Mostly i will help everyone in coding and design stuffs in on Computer
- Best regards hehaho;
- Tvs Praveen wahooo;
- Thanks CodeNStuff! for this amazing Website cooll;
Now add 1 PictureBox
Note: PictureBox is using to paint
Then add this Imports above Public Class Form1
Code: Select all
Then add this code into PictureBox`s Paint in EventsImports System.Drawing.Drawing2D
Code: Select all
Now debug, Here your`s GDI+ Gradient Colored Text Effect is ready to use! Dim txt = "Tvs" & vbCrLf & "Praveen"
Dim font_size As Single = 64
Dim text_path As New GraphicsPath()
Dim font_family As New FontFamily("Comic Sans MS")
' Add text to the path.
text_path.AddString(txt, _
font_family, _
System.Drawing.FontStyle.Bold, _
font_size, _
New PointF(5, 5), _
System.Drawing.StringFormat.GenericDefault)
' Get the text's width and height.
Dim txt_size As SizeF = _
e.Graphics.MeasureString(txt, _
New Font(font_family, _
font_size, _
FontStyle.Bold, _
GraphicsUnit.Pixel))
' Fill the path with a gradient.
e.Graphics.FillPath( _
New System.Drawing.Drawing2D.LinearGradientBrush( _
New Point(5, 5), _
New Point(5 + txt_size.Width, 5 + txt_size.Height), _
Color.Red, _
Color.Yellow), _
text_path)
' Outline the path.
e.Graphics.DrawPath(Pens.DarkBlue, text_path)
End Sub
You can change text, font styles, size, location and sizes in code Paint in Events of PictureBox
Figure 1 [Screenshot of Gradient Colored Text Effect]

*******************Thanks for reading my tutorial, I think this Tutorial will be most helpful to you!*******************
If you want any custom tutorial for you or you need any help in VS.NET, VB.NET, Software Coding, Designing and much more any help in Computer stuffs just ask me
Mostly i will help everyone in coding and design stuffs in on Computer
- Best regards hehaho;
- Tvs Praveen wahooo;
- Thanks CodeNStuff! for this amazing Website cooll;
That is just awesome! When did you learn GDI+?
HAVE YOU gotten this off a forum or something?
Usman55 wrote:That is just awesome! When did you learn GDI+?AI learned GDI+ graphis and to do coding and to make GDI+ effects from all of from Visual Studio 2008 help text book and from MSDN tutorials in web

Hello TVS Praveen,
I am very happy that our community has a great GDI+ teacher! This is another one of your great tutorials.
Thank You.
I am very happy that our community has a great GDI+ teacher! This is another one of your great tutorials.
Thank You.
Usman55 wrote:Hello TVS Praveen,
I am very happy that our community has a great GDI+ teacher! This is another one of your great tutorials.
Thank You.
Okay, Stay tuned coming more tutorials of GDI+ on future wahooo;
I`m still working on making lots of GDI+ related tutorials

Okay youve already answerd my post with what you posted
Thanks

lewisfroom wrote:Okay youve already answerd my post with what you postedWhat you mean?, :?Thanks
And what you talking about which post? :?
You gave me the answer to my question in a random post 

lewisfroom wrote:You gave me the answer to my question in a random postOkay

Copyright Information
Copyright © Codenstuff.com 2020 - 2023