Solved

VB6 glitch in WinXP

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
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…

813 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

15 Experts available now in Live!

Get 1:1 Help Now