Solved

resource files and cursors

Posted on 1998-09-08
8
190 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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
 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

791 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