?
Solved

resource files and cursors

Posted on 1998-09-08
8
Medium Priority
?
193 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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 160 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: 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.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month8 days, 17 hours left to enroll

764 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