Click here to Skip to main content
11,413,676 members (69,055 online)
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 404
1 Maciej Los 210
2 Sascha Lefévre 200
3 KARTHIK Bangalore 145
4 ProgramFOX 130
0 Sergey Alexandrovich Kryukov 9,035
1 OriginalGriff 7,387
2 Maciej Los 3,640
3 Abhinav S 3,298
4 Peter Leow 3,084


Advertise | Privacy | Mobile
Web01 | 2.8.150427.2 | 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