C # Implementation of drawing scaling operations for Visio two-time development

Source: Internet
Author: User

As we know, there is a scaled menu item in the Visio menu view, and as shown below, selecting the response option scales the drawing.

In addition, its sidebar also has a drop-down list box, in addition to the choice of existing options, you can also enter a custom value, to achieve the custom scaling function.

This article describes how to use C # and Visio SDK functions to implement various scaling operations for drawings in Visio. First we create a scaling menu item and a variety of scaling submenu items, as shown in the first shape, and then point to the same function for all the child menu item's event handling, as shown below

private void menu_View_Zoom_Click(object sender, EventArgs e)
   {
 ToolStripMenuItem item = (ToolStripMenuItem)sender;
  SetZoom(item.Text);
 }

Then add the Drop-down list box, as shown in the second graphic, and add its handler function.

private void tsStandard_Zoom_KeyUp(object sender, KeyEventArgs e)
  {
if (e.KeyCode == Keys.Enter)
 {
 SetZoom(tsStandard_Zoom.Text);
}
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.