Click here to Skip to main content
11,935,467 members (63,471 online)
Rate this:
Please Sign up or sign in to vote.
See more: VB VB.NET
Am moving an picturebox1 using arrow keys of keyboard when I hit another picturebox2 i want to stop and not to overlap the picturebox2
Posted 9-Jan-13 7:16am
Why using PictireBox? Most inquirers asking about this control do not really have to use it.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

OK, so before you move the second picturebox, check the new position and size of the box and make sure that it's not going to intersect the position and size of the first picturebox. This is pretty simple math. What's the problem?
OneInNineMillion 9-Jan-13 14:44pm

@ sarathsprakash: It would be very helpful if you could show us what you have so far (code) so we can help you from there.
Dave Kreskowiak 9-Jan-13 15:04pm
You might want to reply to the OP, not me. I'm not the one with the code and problem.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Thank you all I got it,it was not simple since the movement is by using keys
as I mentioned..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.151126.1 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100