resource files and cursors

Ok, you will never get this one. If I put a cursor in a resource file and then call it to be the cursor for that form it works fine and everything untill I press down the left mouse button and hold it then it blinks and you can hardly see it. Note: If I call the cursor from the regular location, Ex. form1.mouseicon = C:\windows\cursor\Pen.cur, then it works fine. Also this is after the program is made into a .exe, if it is run from VB it works. I want the cursor in the resource file though. How can I get it to work right?  Note2: This is in Visual Basic 6.0 with Win98 and plenty of memory and all that good stuff.
bradsobleskyAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
chrisboltConnect With a Mentor Commented:
Try this:

Form1.MouseIcon = LoadResPicture(101, vbResCursor)

In the LoadResPicture function, the second parameter is the type that you want returned. vbResBitmap is a Bitmap, vbResIcon is an Icon, and vbResCursor is a Cursor. Since the MouseIcon is going to be the window's cursor, the MouseIcon should be set to a cursor and not an Icon.
0
 
bradsobleskyAuthor Commented:
Adjusted points to 30
0
 
bradsobleskyAuthor Commented:
Adjusted points to 35
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
chrisboltCommented:
Why do you want the cursor in a resource file?
0
 
bradsobleskyAuthor Commented:
Because that way I don't have to distribute it with the program and It could be edited or deleted.

0
 
chrisboltCommented:
What code are you using now to load the cursor from the Resource file?
0
 
bradsobleskyAuthor Commented:
Form1.Mouseicon = loadrespicture (101, 1)
0
 
bradsobleskyAuthor Commented:
Wierd but it worked. Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.