473,322 Members | 1,232 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,322 software developers and data experts.

Magnifying lens

Greetings,

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

Thanks in advance

Regards
Masood

Dec 19 '06 #1
2 6489
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
--
http://www.sturmnet.org/blog
Dec 19 '06 #2
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
Mark R. Dawson wrote:
Hi Masood,
I posted a reply to something like this a while ago, the code allows you
to load a picture then move the mouse over it and it shows the area the mouse
moves over in a magnifier window, see:
http://groups.google.com/group/micro...4359b41171f10e

Hope that helps
Mark.
--
http://www.markdawson.org
"Masood" wrote:
Greetings,

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

Thanks in advance

Regards
Masood
Dec 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: hills | last post by:
Please reply to hdgbyi@public.guangzhou.gd.cn. Thank you! The limitation of the Photon Hypothesis According to the electromagnetic theory of light, its energy is related to the amplitude...
2
by: Amir | last post by:
I'm looking for script (with an explanation how it works) that would create a "magnifying glass" image effect. Any help would be appreciated.
2
by: Anand Ganesh | last post by:
Hi All, I planning to write a Magnifier Application in Visual C#.NET. So when I move the window on some Image it should work as a lens like magnifying it. Any suggestions on what should I use....
0
by: Raymond Dynowski | last post by:
How would I simulate a magnifying glass. It has to magnify my custom drawing underneath. Thanks for any help in advance
5
by: Crouchie1998 | last post by:
How do I get the filename of the file under the cursor without clicking on it & returning it to my application using VB.NET 2003? Example: Imagine the 'MyCursor.cur' is embedded PictureBox...
5
by: vul | last post by:
In VB6 I used to use Immediate Window to get or change values of variables. It is very convenient while debugging. I used drag and drop operation to paste the variable name into Immediate Window....
1
by: kang jia | last post by:
hi how to create a magnifying glass in my shopping online image so that user can use it to enlarge or reduce the size of the image. something like this ( refer to this website)...
12
by: tfelb | last post by:
Hi all! I bought the book "Programming in C" by Stephen G Kochan. I miss 2 answers at his website. (removestr and the substr function) How can I implement these functions? It would be wonderful...
1
by: Kay Schluehr | last post by:
Here is an evil imperative, non-recursive generator: def ncsub(seq): n = len(seq) R = xrange(n+1) for i in xrange(1,2**n): S = nc = False for j in R: k = i>>j
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.