Show 3-D Text Messages

If you want to print text on an object with 3-D effects, use this subroutine to convert fonts into 3-D fonts with borders. In this routine, the user can define shadow length, shadow color, font color, border color, and position of text on the object. Note that all color values are in the range of 0-15 because they are used as arguments for the QBColor function:

 Sub Fonts3d(Print_Object As Object, Text1 As _	String, postx As Single, Posty As _	Single, Shadow_Length As Integer, _	FontsColor As Integer, ShadowColor As _	Integer, BorderColor As Integer)	Dim I As Integer, Prev_Scale_Mode As Integer	Prev_Scale_Mode = Print_Object.ScaleMode	If postx = -1 Then 'for center align		postx = (Print_Object.ScaleWidth - _			Print_Object.TextWidth(Text1)) / 2	End If	Print_Object.ForeColor = QBColor(ShadowColor)	'Generate shadow	For I = 1 To Shadow_Length * 16 Step 8		Call PrintText(Print_Object, _			postx + I, Posty + I, Text1)	Next I	'Print border	Print_Object.ForeColor = QBColor(BorderColor)	Call PrintText(Print_Object, postx - 15, Posty, Text1)	Call PrintText(Print_Object, postx + 15, Posty, Text1)	Call PrintText(Print_Object, postx, Posty - 15, Text1)	Call PrintText(Print_Object, postx, Posty + 15, Text1)	Print_Object.ForeColor = QBColor(FontsColor)	Call PrintText(Print_Object, postx, Posty, Text1)End SubSub PrintText(Print_Object As Object, _	Xposition As Single, Yposition As _	Single, Text1 As String)	Print_Object.CurrentX = Xposition	Print_Object.CurrentY = Yposition	'Print text on object	Print_Object.Print Text1End Sub' example of usage:Call Fonts3d(Picture1, "WELCOME TO T.T.T.I.", _  50, 150, 5, 6, 11, 12)
Share the Post:
Share on facebook
Share on twitter
Share on linkedin


The Latest

technology leadership

Why the World Needs More Technology Leadership

As a fact, technology has touched every single aspect of our lives. And there are some technology giants in today’s world which have been frequently opined to have a strong influence on recent overall technological influence. Moreover, those tech giants have popular technology leaders leading the companies toward achieving greatness.

iOS app development

The Future of iOS App Development: Trends to Watch

When it launched in 2008, the Apple App Store only had 500 apps available. By the first quarter of 2022, the store had about 2.18 million iOS-exclusive apps. Average monthly app releases for the platform reached 34,000 in the first half of 2022, indicating rapid growth in iOS app development.

microsoft careers

Top Careers at Microsoft

Microsoft has gained its position as one of the top companies in the world, and Microsoft careers are flourishing. This multinational company is efficiently developing popular software and computers with other consumer electronics. It is a dream come true for so many people to acquire a high paid, high-prestige job