Article ID: 160041 - View products that this article applies to.
This article was previously published under Q160041
The MousePointer property in Visual Basic (which applies to Form, MDIForm, and a set of selected controls) allows you to modify the cursor's shape for a Visual Basic application. However, if the cursor is moved away from the Visual Basic application, its shape is determined by other applications or by the Desktop.
This article describes how to modify the cursor's default settings so that these changes are reflected throughout the Desktop.
NOTE: Due to a bug in Windows NT, this article only applies to Windows 95 and Windows 98. Microsoft is researching this issue and will post new information here in the Microsoft Knowledge Base as it becomes available.
On Windows 2000, this program works but not as expected. In the code that follows, in Command1_Click toggles the pointer between an arrow and an arrow/hourglass icon. And the code in Command2_Click has no affect.
At times, you may want to design an application in Visual Basic that allows the user to run other applications or tasks within the same application while a task is running.
A simple way to inform the user that this particular state exists is to modify the cursor to be both an arrow and an hourglass until the first task is completed. You can accomplished this easily with the SetSystemCursor API.
Step-by-Step ExampleThe following example simulates starting a task with the first CommandButton and halting it with the second CommandButton:.
Article ID: 160041 - Last Review: July 1, 2004 - Revision: 3.1
Contact us for more help
Connect with Answer Desk for expert help.