VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This module creates 3D Text All you have to do is to give the text you want to convert to 3D Text,

by Barabas Andrei (3 Submissions)
Category: Graphics
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 7th June 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This module creates 3D Text All you have to do is to give the text you want to convert to 3D Text, the BackColor, the ForeColor, X,Y mode (1

Rate This module creates 3D Text All you have to do is to give the text you want to convert to 3D Text,



'All you have to do is to give the text you want to
'convert to 3D Text, the BackColor, the ForeColor, X,Y
'mode (1 for UpLeft, 2 for UpRight, 3 for DownLeft, 4 for DownRight)
' and the destination surce (form or picturebox)
'Enjoy
Public Function DDDText(ByVal Text As String, ByVal X As Single, ByVal Y As Single, ByVal BColor As ColorConstants, ByVal FColor As ColorConstants, ByVal Mode As Integer, ByVal Destination)
On Error GoTo err
Select Case Mode
   Case 1:
     GoTo leftu
   Case 2:
     GoTo rightu
   Case 3:
     GoTo downl
   Case 4:
     GoTo downr
   Case Else
    GoTo err
End Select
Exit Function

leftu:
Destination.ForeColor = BColor
Destination.CurrentX = X
Destination.CurrentY = Y
For i = 1 To 100
    Destination.Print Text
    X = X + 1
    Y = Y + 1
    Destination.CurrentX = X
    Destination.CurrentY = Y
Next
Destination.ForeColor = FColor
Destination.Print Text
GoTo enda

rightu:
Destination.ForeColor = BColor
Destination.CurrentX = X
Destination.CurrentY = Y
For i = 1 To 100
    Destination.Print Text
    X = X - 1
    Y = Y + 1
    Destination.CurrentX = X
    Destination.CurrentY = Y
Next
Destination.ForeColor = FColor
Destination.Print Text
GoTo enda

downl:
Destination.ForeColor = BColor
Destination.CurrentX = X
Destination.CurrentY = Y
For i = 1 To 100
    Destination.Print Text
    X = X + 1
    Y = Y - 1
    Destination.CurrentX = X
    Destination.CurrentY = Y
Next
Destination.ForeColor = FColor
Destination.Print Text
GoTo enda

downr:
Destination.ForeColor = BColor
Destination.CurrentX = X
Destination.CurrentY = Y
For i = 1 To 100
    Destination.Print Text
    X = X - 1
    Y = Y - 1
    Destination.CurrentX = X
    Destination.CurrentY = Y
Next
Destination.ForeColor = FColor
Destination.Print Text
GoTo enda

err:
MsgBox "There was an error during creation"
enda:
End Function

Download this snippet    Add to My Saved Code

This module creates 3D Text All you have to do is to give the text you want to convert to 3D Text, Comments

No comments have been posted about This module creates 3D Text All you have to do is to give the text you want to convert to 3D Text, . Why not be the first to post a comment about This module creates 3D Text All you have to do is to give the text you want to convert to 3D Text, .

Post your comment

Subject:
Message:
0/1000 characters