Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

resource files and cursors

Posted on 1998-09-08
8
Medium Priority
?
194 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

597 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