Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / September 2004

Tip: Looking for answers? Try searching our database.

PictureBox Locked Property Question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jm - 07 Sep 2004 01:08 GMT
I am trying to put a picture on a form and then when the user clicks
on the picture/image they can resize that image with the sizer arrows
(not the whole form, just the picturebox.)  I thought this would be
via the locked property , but it did not allow me to click the
picture.

Does anyone have any idea how I can accomplish this?  Thank you.
Morten Wennevik - 07 Sep 2004 09:18 GMT
Hi Jim,

I think you need to implement your own sizing code.
Handle the PictureBox MouseMove event to show a resize cursor near the borders.
On MouseDown and the cursor where at a border change the size based on user movements.
You might want to add a border to the picturebox when the user clicks on it to visualize 'edit mode'

--
Happy Coding!
Morten Wennevik [C# MVP]
Daniel Carlsson - 07 Sep 2004 16:45 GMT
Locked is used for locking the control in the designer.
There are some tutorials about how to use the designers in your own
application, but its much easier to write some code that listens to the
mouse events to rezise the code.

> I am trying to put a picture on a form and then when the user clicks
> on the picture/image they can resize that image with the sizer arrows
[quoted text clipped - 3 lines]
>
> Does anyone have any idea how I can accomplish this?  Thank you.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.