Navigate back to the ShowVisio.cs file and, at the top of the file, add in the import statement highlighted below: Select this library and click on the “OK” button.įigure 1: Visual Studio 2005 New Project Dialogįigure 2: Add New Item Dialog Code: Show Vision Control NET tab, and search down the list until you find the “ System.Design” reference. When the “Add Reference” dialog opens, select the. To add this reference, right click on the references folder in the solution explorer and then click on the “Add Reference” menu option. One last step prior to writing the code for this project will be to add in one needed reference. You may now delete the default web control that was created when the project was originally initialized from the template.Īt this point, we should have an open web control library project with a single web control named “ ShowVisio.cs” in that project. When the “Add New Item” dialog appears (Figure 2), select the “Web Custom Control” template, after selecting the template, key ShowVisio.cs into the name field and then click “Add” to close the dialog. Once the project has opened right click on the solution and click on the “Add” menu option, and then select “New Item”. Key in a name for the project and then click “OK”. From the new project dialog (Figure 1), under project types, select the “Windows” node from beneath “C#”, then select the “Web Control Library” template in the right hand pane. In order to get started, open up the Visual Studio 2005 IDE and start a new project. Also, if the Visio diagram is converted to an image, the image will not have the control options available (e.g., scrolling, panning, etc.) when viewing the diagram in the control. The only advantage to using a custom control is that it allows the developer to build a page and add the Visio file to that page as content rather than to merely open the diagram as a standalone page. Of course Visio files may also be converted to a web page or image format and displayed as images added to a web page. It is entirely possible to code the page to display a Visio diagram without using a custom control, having the control handy simplifies the process to the point where someone using it need only drop it onto the page and set a file path property within the IDE (or at runtime) to bring the Visio diagram into the page.įurther, it is possible to open a Visio file directly into Microsoft Internet Explorer to do this, one need only create hyperlink and set it to navigate directly to the Visio file. This version is the first release on CNET article describes a quick and simple approach to creating a custom web control used to display Microsoft Visio files within an ASP.NET page using Internet Explorer. Additionally, drawing-layer visibility and colors can be set in the Layer Settings tab, and annotation visibility and colors can be set in the Markup Settings tab. Some rendering and display settings are available in the Display Settings tab of the Properties and Settings dialog box. Also, you can see properties on any shape by opening the Properties and Settings dialog box and then selecting a shape. You can then pan and zoom in the drawing window by using toolbar buttons, keyboard shortcuts, or menu items in the right-click menu. Internet Explorer will open, and the Visio 2007 Viewer will render the drawing in the browser window. Viewing Visio drawings is as simple as double-clicking the drawing (files with the. The Visio 2007 Viewer is particularly useful for teams that need to collaborate from different locations. Internet Explorer also allows for printing, although this is limited to the portion of the drawing displayed.The Visio 2007 Viewer enables users to discover the advantages of using Visio drawings, charts, and illustrations in a Web-based environment. Visio users can freely distribute Visio drawings and diagrams to team members, partners, customers, or others, even if the recipients do not have Visio installed on their computers. The Visio 2007 Viewer allows anyone to view Visio drawings and diagrams (created with Visio 5.0, 2000, 2002, 2003, or 2007) inside their Internet Explorer version 5.0 or later Web browser.
0 Comments
Leave a Reply. |