AllApi.net

[an error occurred while processing this directive]
 
'On form1 place 2 textboxes (with a height for a couple of lines) and 1 picturebox.
'Select a bitmap for the picturebox and set the autosize on true.
Private Declare Function CreateCaret Lib "user32" (ByVal hwnd As Long, ByVal hBitmap As Long, ByVal nWidth As Long, ByVal nHeight As Long) As Long
Private Declare Function ShowCaret Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetFocus Lib "user32" () As Long
Private Sub Form_Load()
    'KPD-Team 1999
    'URL: http://www.allapi.net/
    'E-Mail: KPDTeam@Allapi.net
    
    'Execute the app. (F5) and you'll see the difference of the cursorshapes.
End Sub
Sub Text1_GotFocus()
    'retrieve the window which has the focus
    h& = GetFocus&()
    'retrieve the handle of our picture
    b& = Picture1.Picture
    'Create a new cursor
    '(handle, bitmap 0=none, width, height)
    Call CreateCaret(h&, b&, 10, 10)
    'Show our new cursor
    X& = ShowCaret&(h&)
End Sub
Private Sub Text2_GotFocus()
    'retrieve the window which has the focus
    h& = GetFocus&()
    'Create a new cursor
    Call CreateCaret(h&, 0, 30, 30)
    'Show the new cursor
    X& = ShowCaret&(h&)
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/