Solved

VB6 glitch in WinXP

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

Title # Comments Views Activity
Hide vba in gp 7 125
MS SQL store procedure to calculate and return result 6 74
Advice in Xamarin 21 119
VB script to continue despite error 2 77
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

739 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