473,770 Members | 4,558 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How best can I create a panel which allows zoom on a drawing?


I would like to create a panel, or other widget, on which I can draw,
say, a triangle, and use the wheel on the mouse to zoom in and out on
the drawing. A vector drawing.

I know this can be done because I have seen apps that do this. They
were 3D and I only need 2D but they were very fast.

Is there an easy way to do this? Do I need to use the DirectX
libraries to do this?

Any pointer in the right direction would be very welcome and hopefully
save me much time.

Thanks,

Steve
Jun 27 '08 #1
5 4738
I wonder if your best approach might be to use WPF to render the area?
This natively supports scaleable vector-based graphics - you'd just need
to add the mouse hooks... Try searching for +WPF +zoom

Marc
Jun 27 '08 #2

Thanks. My original app was written using Windows Forms. Is there an
easy way to convert to WPF?

Steve

On Fri, 09 May 2008 13:05:56 +0100, Marc Gravell
<ma**********@g mail.comwrote:
>I wonder if your best approach might be to use WPF to render the area?
This natively supports scaleable vector-based graphics - you'd just need
to add the mouse hooks... Try searching for +WPF +zoom

Marc
Jun 27 '08 #3
On May 9, 6:48 am, steve <s_j_b...@yahoo .comwrote:
I would like to create a panel, or other widget, on which I can draw,
say, a triangle, and use the wheel on the mouse to zoom in and out on
the drawing. A vector drawing.

I know this can be done because I have seen apps that do this. They
were 3D and I only need 2D but they were very fast.

Is there an easy way to do this? Do I need to use the DirectX
libraries to do this?

Any pointer in the right direction would be very welcome and hopefully
save me much time.

Thanks,

Steve
Check out this site:

http://www.bobpowell.net

and this link in particular:

http://www.bobpowell.net/zoompicbox.htm

Chris
Jun 27 '08 #4
Not really, but you can embed WPF in WinForm (via ElementHost) and
WinForm in WPF (via WindowsFormsHos t).

However, depending on the complexity, the zooming picturebox (that Chris
mentions) looks interesting.

Marc
Jun 27 '08 #5

thanks, I will have to play around with it a bit to see how it would
work for what I want.

Steve

On Fri, 9 May 2008 06:41:43 -0700 (PDT), Chris Dunaway
<du******@gmail .comwrote:
>On May 9, 6:48 am, steve <s_j_b...@yahoo .comwrote:
>I would like to create a panel, or other widget, on which I can draw,
say, a triangle, and use the wheel on the mouse to zoom in and out on
the drawing. A vector drawing.

I know this can be done because I have seen apps that do this. They
were 3D and I only need 2D but they were very fast.

Is there an easy way to do this? Do I need to use the DirectX
libraries to do this?

Any pointer in the right direction would be very welcome and hopefully
save me much time.

Thanks,

Steve

Check out this site:

http://www.bobpowell.net

and this link in particular:

http://www.bobpowell.net/zoompicbox.htm

Chris
Jun 27 '08 #6

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

Similar topics

7
3558
by: Bil Muh | last post by:
Esteemede Developers, I would like to Thank All of You in advance for your sincere guidances. I am developing a software using Visual C++ .NET Standard Edition with Windows Form (.NET) template. Briefly -------------------------------------------------------------------------------------------- I need to create dynamically some controls on the forms, and display these
1
7758
by: JasonL | last post by:
How do I create a map in VB.net where user can "drag" it using their stylus as the map size is big and how to create a zoom in , zoom out function for it? I would like to do something similar to those map in http://www.mapopolis.com/ Thanks in advance
6
2145
by: QT | last post by:
Dear sirs, I want to create panel or label field for each database records. I am using following codes for each database row to create panel field. 'Panel ' i = 1
6
2939
by: Terry Olsen | last post by:
I need to make a terminal window to emulate special characters of a vintage PC. I don't think I can use a console because you can't change its font...can you? So what is the best way to make a terminal window that has a scrollback and is easy to position the cursor? How does hyperterminal & SmartTerm do it? Thanks!
2
12684
by: Mo Ade via .NET 247 | last post by:
How do I write code to include a zoom feature in my project so that when my Vb Form loads an image I can click in my main menu zoom in or zoom out? -------------------------------- From: Mo Ade ----------------------- Posted by a user from .NET 247 (http://www.dotnet247.com/) <Id>6aW7IUJA+0CCEGJ4S8DRuA==</Id>
1
1851
by: Larry | last post by:
Dear friends, I am a novice vb.net user and I am seeking some experts advice. I placed a panel control onto a form, set the autoscroll property (of the panel control) to true. Let's say The size of the panel control is 100 by 100 ( height =100, width=100) Then I draw some picture onto this panel control, the x range of the picture is from 0 to 500 and the height of the picture is 600. Because
4
10561
by: Thiru .Net | last post by:
hi wagner, i have a doubt in panel control in windows application. i have a panel control wherein i have put a picturebox control. i show picture into picturbox control. now i need to zoom in and zoom out the picture in the picturebox control. the picturebox control is within panel(autoscroll is enabled true) scroll bars are enabled.
0
1151
by: Anuhas | last post by:
Dear experts, I have already written codes to zoom a image. I am going to use a table layout panel to remove the button off-placement. But when I try to zoom the image with table lay out panel it doesnt work. Please give me a solution to zoom the image with table lay out panel. Anuhas
3
5210
by: zaklamp | last post by:
Hello, I am searching for a panel that allows me to pan and zoom but i still have to be able to select a object like a Button (so not a pure drawing panel). If anyone have an idee how to handle this, it would be great.
0
9602
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10237
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
9882
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
8905
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...
1
7431
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6690
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5326
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
5467
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3987
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

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.