Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: 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
Comments
Sergey Alexandrovich Kryukov at 9-Jan-13 19:51pm
   
Why using PictireBox? Most inquirers asking about this control do not really have to use it.
—SA
Rate this: bad
good
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?
  Permalink  
Comments
OneInNineMillion at 9-Jan-13 14:44pm
   
Agreed.
 
@ 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 at 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
good
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..
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 381
1 Sergey Alexandrovich Kryukov 245
2 Marcin Kozub 225
3 Praneet Nadkar 217
4 /\jmot 189
0 OriginalGriff 8,284
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,614
3 Maciej Los 4,989
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2014
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