Solved

resource files and cursors

Posted on 1998-09-08
8
186 Views
Last Modified: 2010-04-30
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.
0
Comment
Question by:bradsoblesky
  • 5
  • 3
8 Comments
 

Author Comment

by:bradsoblesky
ID: 1433701
Adjusted points to 30
0
 

Author Comment

by:bradsoblesky
ID: 1433702
Adjusted points to 35
0
 
LVL 2

Expert Comment

by:chrisbolt
ID: 1433703
Why do you want the cursor in a resource file?
0
 

Author Comment

by:bradsoblesky
ID: 1433704
Because that way I don't have to distribute it with the program and It could be edited or deleted.

0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 2

Expert Comment

by:chrisbolt
ID: 1433705
What code are you using now to load the cursor from the Resource file?
0
 

Author Comment

by:bradsoblesky
ID: 1433706
Form1.Mouseicon = loadrespicture (101, 1)
0
 
LVL 2

Accepted Solution

by:
chrisbolt earned 40 total points
ID: 1433707
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
 

Author Comment

by:bradsoblesky
ID: 1433708
Wierd but it worked. Thanks
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now