Solved

VB6 glitch in WinXP

Posted on 2004-08-31
4
302 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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.
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…
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…

757 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

20 Experts available now in Live!

Get 1:1 Help Now