Magnifying lens

  • Thread starter Thread starter Masood
  • Start date Start date
M

Masood

Greetings,

Need help with regards to implementing a magnifying lens using C#, any
ideas, source code, algorithm any thing !!!

Thanks in advance

Regards
Masood
 
Hello Masood,
Need help with regards to implementing a magnifying lens using C#, any
ideas, source code, algorithm any thing !!!

Hm - just a hint: if you want to do it yourself, like to practice
programming or something like that, go do it yourself! If that's not what
you want, just download one of the thousands that already exist. I
recommend zoomit :-)


Oliver Sturm
 
Hi Mark,

Thanks to your code, I was able to create a lens !!!

What we have done here is drawn a rectangle over a Image and then draw
a portion of bitmap onto the rectangle to get the zoom effect same a
you have done in ur code.

However, would appreciate if you could guide me as how I can resize the
rectangle, like if a move the mouse to the right edge or to the bottom
edge should be able to drag and resize the rectangle.

Iam able to do it, however not quite getting it smoothly. below is the
code snippet

if (rightBorder.Contains(new Point(e.X, e.Y)))
{
this.Cursor = Cursors.SizeWE;
if (rightdrag && e.Button== MouseButtons.Left)
{
rect.Width += ((e.X - dragPoint.X));// < 1 ? -2 : 2;
this.Refresh();
}

}

Need clarity also on how to maintain the position of mouse or cursor
as we drag the rectangle.( -> or <-)


Much appreciated !!!

Masood
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top