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

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 4702
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**********@gmail.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 WindowsFormsHost).

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
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)...
1
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...
6
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
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...
2
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 ...
1
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...
4
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...
0
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...
3
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...

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.