mpdph09 0 Newbie Poster

I am working with C# windows application. I am using split container to display image in picture box in the first panel(with scroll bar(50% of the the picture can be seen only by scrolling down)) and data entry fields in the second panel. One field will always be at the bottom of the page which cannot be seen without scrolling down. I am trying for something that will display zoom in part of that area every time picture is loaded(on basis of co-ordinates). I will appreciate if I can get some suggestions. I appreciate all the help.

I have tried with another picture box to magnify that part on image selection(combobox index changed). It works fine for the coordinates till size of panel 1 in splitcontainer, if I try with higher co-ordinates instead of showing bottom part of the image it displays top part of panel2 or the partition depending on the coordinates. I need help with displaying bottom part of the image.

                   pictureBox3.BorderStyle = BorderStyle.FixedSingle;
                   Point startpoint = pictureBox2.PointToScreen(new Point(0, 420));
                   Graphics G = this.CreateGraphics();
                   Bitmap screenGrab = new Bitmap(pictureBox2.Image.Width, pictureBox2.Image.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
                   G = Graphics.FromImage(screenGrab);
                   G.CopyFromScreen(startpoint, new Point(0, 0), pictureBox2.Size, CopyPixelOperation.SourceCopy);
                   pictureBox3.Image = screenGrab;
                   pictureBox3.Visible = true;

                   Graphics G1 = Graphics.FromImage(pictureBox3.Image);
                   GraphicsPath path = new GraphicsPath();
                   int L = 0;
                   int T = 0;
                   //int X = 1000;
                   //int Y = 1000;
                   L = pictureBox3.Width / 2 + (pictureBox2.Image.Width) / pictureBox2.Width;
                   T = pictureBox3.Height / 2 + pictureBox2.Height - (pictureBox2.Image.Height) / pictureBox2.Height;
                   G1.DrawPath(cpen, path);
                   G1.SetClip(path, CombineMode.Replace);
                  // Clip Magnifying area to screen capture
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.