Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Mouse icon with a user control


Reply
 
Thread Tools Display Modes
  #1  
Old 04-12-2006, 01:55 PM
Losey Losey is offline
Regular
 
Join Date: Oct 2004
Location: Kaneohe Hawaii
Posts: 59
Default Mouse icon with a user control


I tried assigning HNWSE.CUR to the mouseicon property of my control and assigned the mousepointer to 99. However, when I pass over the usercontrol during run time, the cursor does not change. I can change the dragicon of the same user control, but I want the cursor to change when passing over to show that the control CAN be dragged.
Reply With Quote
  #2  
Old 04-12-2006, 03:03 PM
anomaly's Avatar
anomaly anomaly is offline
Contributor
 
Join Date: Sep 2001
Location: Florida
Posts: 517
Question

Quote:
Originally Posted by Losey
I tried assigning HNWSE.CUR to the mouseicon property of my control and assigned the mousepointer to 99. However, when I pass over the usercontrol during run time, the cursor does not change. I can change the dragicon of the same user control, but I want the cursor to change when passing over to show that the control CAN be dragged.

tried it with a command button and it seemed to work fine.

highlight the command button and go select a custom icon (i used bullseye)

when i first tried, i selected a custom icon on the form instead of the button and it didnt do jack. so maybe your issue is similar in nature?

'example needs a command button

Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Command1.MousePointer = 99
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.MousePointer = 1
End Sub

if its your own custom control, which i cant remember how to make, that is probably a different issue all together.

maybe more details would be in order then.

later =)
__________________
So let it be written. So let it be run.
Reply With Quote
  #3  
Old 04-13-2006, 02:37 PM
Losey Losey is offline
Regular
 
Join Date: Oct 2004
Location: Kaneohe Hawaii
Posts: 59
Default

It is a very simple user control that I originated. It has no code, just a graphic picture and mask picture with transparent background. When editing the user control I set the mouseicon and mousepointer properties. It is intended fro dragging around in a picture box which is why I need a custom icon when the user points the mouse to it. Drawn on the form, it does not have a mouseover event. Perhaps I need code for it to recognize mouseover?
Reply With Quote
  #4  
Old 07-20-2006, 03:20 PM
Losey Losey is offline
Regular
 
Join Date: Oct 2004
Location: Kaneohe Hawaii
Posts: 59
Default Found Answer

The solution - I don't understand why, is to execute Screen.MousePointer = 0 AFTER the form load event has been processed. All the user control mouseicons work fine after that.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->