473,800 Members | 2,607 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6508
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.Co ntains(new Point(e.X, e.Y)))
{
this.Cursor = Cursors.SizeWE;
if (rightdrag && e.Button== MouseButtons.Le ft)
{
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
1963
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 of the electric field of the electromagnetic wave, W=eE^2(where E is the amplitude). It apparently has nothing to do with the light's circular frequency v.
2
6830
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
5988
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. Do I have to use a picturebox control or is there any other control which will do this task for me? Thanks for your time.
0
1364
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
1499
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 MouseDown Event: --------------------------------
5
5648
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. In VB 2005 this approach either doesn't work or I need to do it some different way. Of course VB 2005 environment allows to see values right in the code window, but it's true only for not too long strings. With a long string I still need Immediate...
1
1789
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) http://www.coach.com/content/product.aspx?product_no=10155&category_id=900 thanks :)
12
2320
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 if someone can help me out, because Stephen Kochan is not reachable. Thanks for any help
1
197
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
10501
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10273
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10250
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10032
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9085
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5469
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5603
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2944
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.