Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools

Print3D - Display text with 3D effect

Total Hit ( 2936)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article

Rating


 


Click here to copy the following block
' Display a text with 3D effect
'
' OBJ can be a form or a PictureBox
' TEXT is the text to be displayed
' X, Y are the coordinate (in twips or in current coordinate system)
' SHADOWCOLOR is the color of the shadow (default is black)
' SHADOWOFFSET is the distance of shadow in pixels (default is 1 pixel)
'  can be negative to give different effect
'
'Example:
'  Me.FontName = "Arial Black"
'  Me.FontSize = 20
'  Me.ForeColor = vbWhite
'  Print3D Me, "Test this", 20, 20, vbBlack, 1


Sub Print3D(ByVal obj As Object, ByVal Text As String, ByVal X As Long, _
  ByVal Y As Long, Optional ByVal shadowColor As Long = vbBlack, _
  Optional ByVal shadowOffset As Integer = 1)
  Dim saveColor As Long
  Dim offset As Single
  
  ' convert the offset into current coordinate system
  offset = Me.ScaleY(shadowOffset, vbPixels, obj.ScaleMode)
  
  ' Save current forecolor
  saveColor = obj.ForeColor
  
  ' Display the shadow first
  obj.CurrentX = X + offset
  obj.CurrentY = Y + offset
  obj.ForeColor = shadowColor
  obj.Print Text;
  
  ' Next display the text in current forecolor
  obj.ForeColor = saveColor
  obj.CurrentX = X - offset
  obj.CurrentY = Y - offset
  obj.Print Text;

End Sub


Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.