The trivial of C # 's two development of Visio (i)

Source: Internet
Author: User

1. Set the color for the entity

In some analysis, such as electrical circuit analysis, the need to change the color of the entity according to the different state, then how to change the device color of the specified entity? The following provides code to resolve the problem.

SHAPE.GET_CELLSU ("LineColor"). ResultIU = (double) visdefaultcolors.visdarkgreen;//with electricity (green)

Where Visdefaultcolors is an enumeration, there are many colors, you can check the SDK, you can use its corresponding value to replace

dark Cyan
Constant Value Description
visblack black
visblue 4 blue
Viscyan 7 cyan
Visdark Blue dark Blue
Visdarkcyan 13
Visdarkgray 19 dark d>
Visdarkgreen 9 VISD arkred dark Red
visdarkyellow 11 dark Yellow

............

The above code is more concise, of course, you can use the following method:

SHAPE.GET_CELLSSRC (short) Vissectionindices.vissectionobject, (short) visrowindices.visrowline, (short) Viscellindices.vislinecolor). FormulaU = 4

Related Article

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.