[RESOLVED] AntiAlias text please..
hello here is my code
VB Code:
Private Sub Command1_Click()
With Picture1
Picture1.ScaleMode = 3 'Pixel
.FontName = Combo1.Text
.ForeColor = vbWhite
.FontSize = Text5.Text
.AutoRedraw = True
.Cls
.PaintPicture Image1.Picture, 0, 0
.PaintPicture Image2.Picture, 0, 0, 150, 150
Picture1.CurrentX = Text3.Text
Picture1.CurrentY = Text4.Text
Picture1.Print Text2.Text
End If
End With
End Sub
now how do i make the text it prints AntiAlias ?
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.
1 Attachment(s)
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...
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:
Picture1.Print text1.text
drawtext TestForm.hdc, "text1", 0, 170, vbRed, 0.6, "Comic Sans MS", 40
am I using it right?
Re: AntiAlias text please..
Re: AntiAlias text please..
VB Code:
drawtext Picture1.hdc, "VB Forums", 10, 10, vbRed, 0.6, "Comic Sans MS", 40
Re: AntiAlias text please..
Got it :) Thank you all !!!