by LGans (2 Submissions)
Category: Windows API Call/Explanation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 4th September 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Creates Carets for the picture u provide in ur picture box
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 DestroyCaret _
Lib "User32" () As Long
Private Declare Function ShowCaret Lib "User32" _
(ByVal hWnd As Long) As Long
Private Sub Form_Activate()
Dim w, h As Long
w = Picture1.Picture.Width
h = Picture1.Picture.Height
Call CreateCaret(Me.Text1.hWnd, Picture1.Picture.Handle, w, h)
Call ShowCaret(Me.Text1.hWnd)
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Call DestroyCaret
End Sub
---------------------------------------------------------------------
Just a small Request to all VB Gurus!!
1. Please tell me how to create a system wide mouse pointer thro my program
When my program terminates the prev mouse pointer should be restored
2.When u install applications like WinZip , the Add To Zip options comes
in the system pop-up menu when r right click on a file or a directory.
Please tell me how i should add / delete a menuitem like Add To Zip
thro' my application !!
As i am just 2 weeks old to VB !! I am totally unaware of these activities !!
------------------------------------------