472,995 Members | 1,909 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,995 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 4660
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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.