Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Change cursor pics and size
Author:
Arjob
E-mail:
Click to e-mail author
Submitted:
8/17/2009
Version:
VB6
Compatibility:
VB6
Category:
Windows API
Views:
11320
Change cursor picture and size. This code is also valid in .NET. Use www.pinvoke.net for more API information.
Declarations:
'add this to general declaration: 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 GetFocus Lib "user32" () As Long Private Declare Function ShowCaret Lib "user32" (ByVal hwnd As Long) As Long
Code:
'add a picturebox and textbox 'set the picturebox picture for cursor Private Sub Form_Load() dim hFocus as long dim hCaret as long dim pic as long pic= picture1.picture hFocus = GetFocus() hCaret = CreateCaret(hFocus,pic, 5,5) ShowCaret hFocus End sub
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement