Solved

resource files and cursors

Posted on 1998-09-08
8
187 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Restricting text box entry from \/:?<>"| 9 76
VBA open file from excel cell 4 36
How to Add / Edit Windows Menu 4 49
Set email body to html using vbscript 6 22
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…

932 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

10 Experts available now in Live!

Get 1:1 Help Now