Click here to Skip to main content
15,890,897 members
Please Sign up or sign in to vote.
3.00/5 (3 votes)
See more:
Suggest a way of selecting a control (eg Picturebox) when application is running.
For eg.-- i want to drag the picture in the form using mouse.
Posted

1 solution

Well, your question doesn't really make any sense. To "select" a control, simply do this:

C#
PictureBox.Focus();


As to part two of your un-question, you're not dragging the image - you're dragging the control that contains the image. This tip might help:

Draggable WinForms Controls[^]
 
Share this answer
 
Comments
[no name] 8-Jul-11 15:00pm    
thanks for ur correction i m greatly flattered.....
#realJSOP 8-Jul-11 15:03pm    
You 1-voted me when I tried to help you? Did you even look at the link I posted?
[no name] 8-Jul-11 15:07pm    
thanks for the link so another 1- vote for u
#realJSOP 8-Jul-11 15:13pm    
First, only your most recent vote counts. Second, and assuming you don't understand our system here on CodeProject, a 5 is a positive vote, and a 1 is a negative vote.
Sergey Alexandrovich Kryukov 9-Jul-11 23:03pm    
Yes, and 1 means "completely idiotic post, a lie", 5 means excellent. Apparently OP re-voted. I voted 5, too. :-)
--SA

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900