Results 1 to 7 of 7

Thread: [RESOLVED] AntiAlias text please..

  1. #1

    Thread Starter
    Addicted Member thekurbster's Avatar
    Join Date
    Mar 2006
    Posts
    173

    Resolved [RESOLVED] AntiAlias text please..

    hello here is my code

    VB Code:
    1. Private Sub Command1_Click()
    2.  
    3. With Picture1
    4.      Picture1.ScaleMode = 3 'Pixel
    5.     .FontName = Combo1.Text
    6.     .ForeColor = vbWhite
    7.     .FontSize = Text5.Text
    8.     .AutoRedraw = True
    9.    
    10.     .Cls
    11.    
    12.     .PaintPicture Image1.Picture, 0, 0
    13.     .PaintPicture Image2.Picture, 0, 0, 150, 150
    14.    
    15.      
    16.   Picture1.CurrentX = Text3.Text
    17.   Picture1.CurrentY = Text4.Text
    18.   Picture1.Print Text2.Text
    19.   End If
    20.  
    21.   End With
    22.  
    23. End Sub


    now how do i make the text it prints AntiAlias ?

  2. #2
    Frenzied Member longwolf's Avatar
    Join Date
    Oct 2002
    Posts
    1,343

    Re: AntiAlias text please..

    The only way I know of is to use GDI+.
    You should find it if you do a search here or at the planetsourcecode site.

  3. #3
    Hyperactive Member
    Join Date
    Feb 2003
    Location
    Grenada
    Posts
    346

    Re: AntiAlias text please..

    Attached is a module that I had on my PC (it's about 2-3 years old)... I can't even remember which VB site I got it from or who was the author. But I have used it countless times to create some nice AA text effects...

    To use it, just call the function DrawText ...

    Example:

    drawtext Form1.hdc, "VB Forums", 0, 170, vbWhite, 0.6, "Comic Sans MS", 40

    Just make sure that whatever device you're drawing on, had a handle to a Device Context (hDC)... you may also want to set AutoRedraw property to true to prevent overlay erasing...

    You should be able to figure out the rest on your own...
    Hope this helps...
    Attached Files Attached Files
    If my post has been helpful, then please rate it accordingly...
    If it has solved your question(s), then don't forget to mark the thread as "[Resolved]"... thank you.

  4. #4

    Thread Starter
    Addicted Member thekurbster's Avatar
    Join Date
    Mar 2006
    Posts
    173

    Re: AntiAlias text please..

    Quote Originally Posted by Protocol
    Attached is a module that I had on my PC (it's about 2-3 years old)... I can't even remember which VB site I got it from or who was the author. But I have used it countless times to create some nice AA text effects...

    To use it, just call the function DrawText ...

    Example:

    drawtext Form1.hdc, "VB Forums", 0, 170, vbWhite, 0.6, "Comic Sans MS", 40

    Just make sure that whatever device you're drawing on, had a handle to a Device Context (hDC)... you may also want to set AutoRedraw property to true to prevent overlay erasing...

    You should be able to figure out the rest on your own...
    Hope this helps...

    tried this but i guess im not too sure how it works. Like i said just a newbie here

    VB Code:
    1. Picture1.Print text1.text
    2.    drawtext TestForm.hdc, "text1", 0, 170, vbRed, 0.6, "Comic Sans MS", 40


    am I using it right?

  5. #5

    Thread Starter
    Addicted Member thekurbster's Avatar
    Join Date
    Mar 2006
    Posts
    173

    Re: AntiAlias text please..

    *bump*

  6. #6
    Old Member moeur's Avatar
    Join Date
    Nov 2004
    Location
    Wait'n for Free Stuff
    Posts
    2,712

    Re: AntiAlias text please..

    VB Code:
    1. drawtext Picture1.hdc, "VB Forums", 10, 10, vbRed, 0.6, "Comic Sans MS", 40

  7. #7

    Thread Starter
    Addicted Member thekurbster's Avatar
    Join Date
    Mar 2006
    Posts
    173

    Re: AntiAlias text please..

    Got it Thank you all !!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width