I'm developping an application using VB5 (SP3) on a NT4 SP6 PC.
Here's my problem : i have a label on a form. Clicking on this label loads a form. OK, it's pretty simple. This label has its MousePointer set to value "99-custom" and its MouseIcon set to some pointer.ico file.
At runtime, when the mouse pointer is on the label, and it's the pointer.ico i have defined for it. Then i click on the label, loads the other form and then go back to the first form => the mouse pointer on the label is the default one and not the pointer.ico one as it should be!
when i try to debug this, i can see that the label MousePointer is still set to value "99" but the hPal property of the Picture defined for the label MouseIcon is set to "Error Automation"...
I have no idea what to do? If anybody can give me a hint please?
Err, maybe my problem's too simple, but really, i'm a beginner coder... maybe i missed something?
I've read some posts about the change of mouse cursors when moving over over controls... and it works just fine, well, before i click on the label...
after that, the cursor is set on default cursor, for all the labels that are normally set to a customized cursor...
Last edited by nekosan; September 21st, 2004 at 11:01 AM.
When the label is clicked, try loading a blank form instead and see if it's ok. If the problem still occurs, then perhaps a control on a loaded form is causing it. If it's ok, then perhaps a control on the form being loaded when the label is clicked is causing the problem. Other than that, make sure you are using Option Explicit at the top of your forms.
Let us know what you find.
Please remember to rate the posts and threads that you find useful.
How can something be both new and improved at the same time?
ok, the problem doesn't occur when i load a blank form with a click on the label... I know where to look now, on the form being loaded by the label click...
I still don't know what to do, but it's a start!
thanks!
PS : i already use the option Explicit on all my forms...
Last edited by nekosan; September 22nd, 2004 at 07:28 AM.
Clicking on the label with the custom cursor loads a modal form.
When the user closes this form, the following lines of code (on the modal form) are executed :
Unload Me
Screen.MousePointer = 1
=> So setting the mousepointer property of the object Screen to the Arrow cursor value makes the cursor look like an arrow no matter where the mouse is, even when the mouse is over my label, which was set at design time to a custom cursor???
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.