I'm looking to find a way to display DWF file on a VB .Net form with zooming capability. The Design Review control is not working with Visual Studio 2010. I download DWF toolkit but there is no sample to display a file.
Is anybody have an idea how to do that?
Solved! Go to Solution.
The DWF Toolkit has no viewing capability, so good luck with that to find a sample that lets you display a file ...
The only component that can handle the display is the Design Review control. I was writting an article to workaround the crash in VS2010:
While inserting the Design Review control inside a Form, Visual Studio 2010 is crashing. Is there a workaround for that?
Unfortunately this is a know issue, but it is on VS2010 side rather than ADR.
You can refer to this web page for more information:
It is mentioned that a fix might be available, but it is not publicly exposed, so you would need to approach Microsoft support team directly.
One workaround, without the use of Microsoft fix, would be to insert the viewer inside a user control and dynamically insert the control inside the form at runtime, so you could at least use the designer to create other elements inside your form.
Here is the workflow:
- Create a new C# / VB.Net project
- Create a new UserControl in the solution
- Turn OFF the solution explorer and property display
- Insert the DWF viewer in the new UserControl: this doesn't crash…
- Add the new UserControl at runtime inside your form
Attached is a small VB.Net sample that illustrates the idea.
Thank vou very much Philippe,
It works very well. I have a couple of questions:
Unfortunately you can't distribute the dependencies with your app as the license doesn't allow it.
Also I don't think it allows you to distribute ADR installer with your app, the user will have to install it seperately.
The crash is also happening in 2012 if I recall correctly. I didn't test it under 2013 though.
I read the license agreement and I think I can distribute the installer as is, not altered, with original license agreement as part of my installation setup. Usually, I include this kind of software in my setup. It launch the original installer automaticaly as prerequisites.