Xtreme .Net Talk
Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Registered members
Current visitors
New profile posts
Search profile posts
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Xtreme .Net Talk
.NET
Graphics and Multimedia
Displaying playing cards
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="snarfblam" data-source="post: 472728" data-attributes="member: 24666"><p>havens1515, I edited your post to remove the link. It's best to link to a copy of your project rather than to an executable. That way we're safe from viruses and the like, and we can help you better if we can see the code.</p><p></p><p>Anyways, the root of the problem is that when you move the card up 30 pixels, it causes the mouse to be outside the picture box, raising the MouseLeave event. This causes you to move the PictureBox back, which causes the mouse to re-enter the PictureBox, ad infinitum.</p><p></p><p>The ideal solution would be to do away with the picture boxes and do all the drawing and mouse processing yourself, but that's, like, work. </p><p></p><p>A solution that would involve less work would probably involve a different, more complicated way of detecting that the mouse has moved away from the card. For example, instead of using the MouseEnter and MouseLeave events of the picture box, you could handle the MouseMove event of all the cards, as well as the form. In any MouseMove handler, you would check to see if the mouse has moved outside the normal (unraised) bounds of the currently raised card, and if so, lower it.</p></blockquote><p></p>
[QUOTE="snarfblam, post: 472728, member: 24666"] havens1515, I edited your post to remove the link. It's best to link to a copy of your project rather than to an executable. That way we're safe from viruses and the like, and we can help you better if we can see the code. Anyways, the root of the problem is that when you move the card up 30 pixels, it causes the mouse to be outside the picture box, raising the MouseLeave event. This causes you to move the PictureBox back, which causes the mouse to re-enter the PictureBox, ad infinitum. The ideal solution would be to do away with the picture boxes and do all the drawing and mouse processing yourself, but that's, like, work. A solution that would involve less work would probably involve a different, more complicated way of detecting that the mouse has moved away from the card. For example, instead of using the MouseEnter and MouseLeave events of the picture box, you could handle the MouseMove event of all the cards, as well as the form. In any MouseMove handler, you would check to see if the mouse has moved outside the normal (unraised) bounds of the currently raised card, and if so, lower it. [/QUOTE]
Insert quotes…
Verification
Post reply
.NET
Graphics and Multimedia
Displaying playing cards
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top
Bottom