AllApi.net

[an error occurred while processing this directive]
 
Private Declare Function BeginPath Lib "gdi32" (ByVal hdc As Long) As Long
Private Declare Function EndPath Lib "gdi32" (ByVal hdc As Long) As Long
Private Declare Function PathToRegion Lib "gdi32" (ByVal hdc As Long) As Long
Private Declare Function TextOut Lib "gdi32" Alias "TextOutA" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal lpString As String, ByVal nCount As Long) As Long
Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Private Sub Form_Click()
    'end..
    Unload Me
End Sub
Private Sub Form_Load()
    'KPD-Team 2000
    'URL: http://www.allapi.net/
    'E-Mail: KPDTeam@Allapi.net
    Dim hRgn As Long
    Const sText = "Click Here!"
    'set the font to 'Times New Romen, size 72'
    Me.FontName = "Times New Roman"
    Me.FontSize = 72
    'set the backcolor to Red
    Me.BackColor = vbRed
    'open a path bracket
    BeginPath Me.hdc
    'draw the text
    TextOut Me.hdc, 0, 0, sText, Len(sText)
    'close the path bracket
    EndPath Me.hdc
    'convert the path to a region
    hRgn = PathToRegion(Me.hdc)
    'set the Window-region
    SetWindowRgn Me.hWnd, hRgn, True
    'destroy our region
    DeleteObject hRgn
End Sub


 
Copyright © 1998-2000, The KPD-Team.
Send mail to KPDTeam@Allapi.net with comments about this web site.
This site is located at
http://www.Allapi.net/