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

x
?
Solved

VB6 glitch in WinXP

Posted on 2004-08-31
4
Medium Priority
?
315 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
[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
  • 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 750 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
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…
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

610 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