473,411 Members | 1,894 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

rectangle drawn on picturebox gets erased when i scroll image.

9
rectangle drawn on picturebox gets erased when i scroll image.i.e
i have made application for image cropping. on mouse down and mouse up event, an rectangle is drawn on picturebox using graphics.
1) now the problem is that when scroll image rectangle drawn on picturebox gets erased.

2)now i want resize this rectangle as per user's interest
how to resize the rectangle and drag the rectangle on picture box.


Awaiting for the answers.

thank you!!!
Apr 1 '10 #1
5 2733
55555
9
rectangle drawn on picturebox gets erased when i scroll image.i.e
i have made application for image cropping. on mouse down and mouse up event, an rectangle is drawn on picturebox using graphics.
1) now the problem is that when scroll image rectangle drawn on picturebox gets erased.

2)now i want resize this rectangle as per user's interest
how to resize the rectangle and drag the rectangle on picture box.

Awaiting for the answers.

thank you!!!
Apr 1 '10 #2
RedSon
5,000 Expert 4TB
Just hit that submit button once please. Your threads have been merged.
Apr 1 '10 #3
tlhintoq
3,525 Expert 2GB
1) Redraw the box in the new {scrolled} location
2) Your box, right now, is most likely nothing more complex than a drawing of 4 lines, right? You'll have to make it a control that is a bit smarter. Give it handles that can be grabbed etc. It will need to become a full-fledged object that you keep track of. Or better still that keeps track of itself; knowing its own size, location etc.
Apr 1 '10 #4
55555
9
@RedSon
. did not understood?
Apr 2 '10 #5
55555
9
@tlhintoq
. did not understood
Apr 2 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: James Dean | last post by:
I am drawing in a picturebox and am having some problems. I display outputted images in the picturebox. If the image is too big for the client area then i have scrollbars. The problem is that once...
3
by: | last post by:
I am having a hard time understanding the logic behind the Rectangle object. My problem has to do with the way the rectangle treats the "Width" property. For example, take the following rectangle...
8
by: nobody | last post by:
How do I save a PictureBox bitmap with changes drawn on the bitmap? This doesn't do it: PictureBox1.Image.Save("key30.bmp")
3
by: Peter Proost | last post by:
Hi I got this code to read in a file to the database, if use it to save a image from a picturebox to the database it works ok, but now I use it to directly save a file to the database without...
5
by: DazedAndConfused | last post by:
I have a rectangle around text that I want to fill in with color. I do not know the height of the rectangle until I actually go through and draw out the text. Is there a way of filling in the...
4
by: Yash | last post by:
Have used DrawLine() method to draw some lines in the picturebox (sort of a barcode) in the picturebox paint event. This diagram has to be saved as an image in bmp or tiff format. But the problem...
3
by: emferrari | last post by:
Hi all I have a picturebox which I will have a image loaded to it and some text fields with coordinates. I am drawing a rectangle according to the coordinates in the text fields. Rectangle r...
4
by: RobinS | last post by:
I am drawing a rectangle on a picture that has already been drawn on the graphics area (a user control). It works something like this: //in the MouseDown event m_isDragging = true; m_oldX =...
1
by: kummu4help | last post by:
hi, i want to draw rectangle based on mousedrag event. if user dragging the mouse, then the rectangle on the applet should increase or decrease basing on current mouse coordinates. i have the...
10
by: eddie tan | last post by:
Hi, I have a picturebox with graphics drawn from different objects. In one object I used Pen P1; P1 = new Pen(Color.Blue, 3); Graphics g = null; g = Graphics.FromImage(image.Image);...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.