using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Microsoft.Office.Interop.Visio; using System.Collections; namespace SmartUML { public partial class frmCanvas : Form { Document currentStencil,p; Window stencilWindow,d; public frmCanvas() { InitializeComponent(); } private void frmCanvas_Load(object sender, EventArgs e) { string ApplicationPath = System.Windows.Forms.Application.StartupPath + @"\Umls\"; Microsoft.Office.Interop.Visio.Application app = this.axDrawingControl1.Document.Application; app.Addons.Add(ApplicationPath + "\\UML.VSL"); app.Documents.Add(ApplicationPath + "\\UMLMOD_U.VST"); DrawCurrentShape(CoreLib.CurrentFile); } public void DrawCurrentShape(string currentSelection) { string ApplicationPath = System.Windows.Forms.Application.StartupPath + @"\Umls\"; currentStencil = axDrawingControl1.Document.Application.Documents.OpenEx(currentSelection, (short)VisOpenSaveArgs.visOpenDocked); Page currentPage = axDrawingControl1.Document.Pages[1]; stencilWindow = currentPage.Document.OpenStencilWindow(); } private void frmCanvas_FormClosed(object sender, FormClosedEventArgs e) { System.Windows.Forms.Application.Exit(); } private void saveToolStripMenuItem1_Click(object sender, EventArgs e) { // Here i want to write the code for Saving } } }
image.Save
System.Drawing
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)