Print 3D text of a form

Print 3D text of a form

This simple code print the 3D text "Abdul Baig" on the top left corner of the form. You can change The text "Abdul Baig" to whatever you like. You can also change the tail of the text. You must set the from's autoredraw property to true.

Dim i As Integer
Dim sx As Integer
Dim sy As Integer

Private Sub Form_Load()
Form1.AutoRedraw = True
Form1.ForeColor = vbBlue 'Set the shadow(tail) color to blue. You can set your own colour here

Form1.ScaleMode = 3 'should always set to pixels(3)
Form1.FontBold = True 'It is used to just show the text more clear
sx = 2
sy = 2
For i = 0 To 10 'you can set the end position of i to the length of the shadow(tail)
CurrentX = sx + i
CurrentY = sy + i

If i = 10 Then Form1.ForeColor = vbWhite 'The number of i should always set to the end number of i in the loop
'vbwhite is the forecolour of the text now. You can change the colour here
Form1.Print "Abdul Baig" 'You can change the text to what ever  you want
Next
End Sub

You might also like...

Comments

 Abdul

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Never trust a programmer in a suit.” - Anonymous