Solved

VB6 glitch in WinXP

Posted on 2004-08-31
4
308 Views
Last Modified: 2008-03-10
There seem to be a glitch when you run a VB6 app in WinXp. The glitch is with the Mouseicon/pointer in a picturebox. It seems to default to the "IBeam" pointer, regardless which pointer that was selected in the program. Any workaround?
0
Comment
Question by:inorse
  • 2
  • 2
4 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 11948208
I don't think it's XP.  I'm on XP and can mouse over a PictureBox and change the pointer without a problem.
0
 

Author Comment

by:inorse
ID: 11948389
The problem doesn't occur when I run the app in Win98.

The pointer is supposed to change to a "crosshair" pointer when the mouse is over the picture box.
It has been hard coded to to so. Instead, It automatically switches to the "IBeam" pointer.

I know there is a glitch somewhere, because if I go to change the pointer inside the Control Panel - Mouse,
and change the default pointer to a "Crosshair" there, the VB6 app seems to be working fine. However, that
is only until I restart the PC...

Is there any way I can programmatically manipulate the shell/regisitry setting?
0
 

Author Comment

by:inorse
ID: 11948496
I may have stumbled across the answer myself:

Microsoft Knowledge Base Article - 201588
BUG: Custom Mouse Pointer Changes Back to Default

I don't feel like putting code in the mousemove event that coerces the mousepointer setting to display a "crosshair".
0
 
LVL 76

Accepted Solution

by:
David Lee earned 250 total points
ID: 11950592
I'm glad you found the article.  The test I performed before posting my first response set the mousepointer in the MouseMove event.  Yes, you can manipulate the shell and the registry from within VB.  Probably the easiest way to do that is to use the WshShell object.  Add a reference in your project to Windows Script Host Object Model.  Create a variable of type WshShell.  You can then use the RegRead and RegWrite methods to manipulate the registry.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Suggested Solutions

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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

828 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