Sure there are dll's for this, but i've once tried to make a antialiased circle, here's the sample:
Put a picture on the form and it will blend to the background.Code:Private Declare Function SetPixelV Lib "gdi32" (ByVal hdc As Long, ByVal X As Long, ByVal Y As Long, ByVal crColor As Long) As Long Private Declare Function GetPixel Lib "gdi32" (ByVal hdc As Long, ByVal X As Long, ByVal Y As Long) As Long Private Sub Command1_Click() Dim dx&, dy&, X&, Y&, fade!, color1&, color2&, alpha& Picture = Image For Y = 1 To 200 For X = 1 To 200 dx = 100 - X dy = 100 - Y fade = Abs(100 - Sqr(dx * dx + dy * dy)) If fade < 1 Then color1 = GetPixel(hdc, X, Y) color2 = vbRed alpha = RGB((color1 Mod 256) * fade + (color2 Mod 256) * (1 - fade), (Int(color1 / 256) Mod 256) * fade + (Int(color2 / 256) Mod 256) * (1 - fade), Int(color1 / 65536) * fade + Int(color2 / 65536) * (1 - fade)) SetPixelV hdc, X, Y, alpha End If Next X Next Y End Sub





Reply With Quote