C #. NET ActiveX control development,

Source: Internet
Author: User

C #. NET ActiveX control development,

Recently I have developed an activeX control. Below are some of my summary.

1. Create a class library project and set [assembly: ComVisible (true)] In AssemblyInfo. cs.
Indicates that the type in this Assembly is visible to the COM component. Use the namespace using System. Runtime. InteropServices; set [assembly: System. Security. AllowPartiallyTrustedCallers ()] to ensure that the assembly is accessible.

2. Use the vs tool to generate a new GUID for the custom class, such as [Guid ("xxxxxxxx-xxxx-xxxxxxxxxxxx")]. On the "generate" tab, select "register for Com interoperability", compile and generate the code, and find the corresponding registration code in the registry. Note: Enable IDE with administrator permissions under Windows 7.

3. on the web page, use <object id = "id" classid = "clsid: {xxxxxxxx-xxxx-xxxxxxxxxxxx}"> </object> to obtain the activeX control, and the method is called successfully. Note: No certificate is added for the control. To access the control, you need to set browser security information.

Reference Links:
Http://blog.sina.com.cn/s/blog_458983150100esga.html
Http://blog.163.com/tom19900920@126/blog/static/2349868720121195250522/
Http://xu.xue.yi.blog.163.com/blog/static/9573824820101114111941871/
Http://www.woxihuan.com/139766224/1336830428086975.shtml


Symbol in C Language <Yes

Left shift operator (<)

Removes all the binary bits of an operation object from the left and adds 0 to the right ).

For example, a = a <2 shifts the binary bits of a two places to the left and complements 0 to the right,

Move 1 to the left and then a = a * 2;

If the left shift does not include 1 in the Discard high position, then shifts one bit left, which is equivalent to multiplying the number by 2.
Shift right operator (>)

Shifts all the binary bits of a number to several places to the right, and adds 0 to the left of the positive number, 1 to the left of the negative number, and discards the right of the negative number.

The operand shifts one digit to the right, which is equivalent to dividing the number by 2.

For example, a = a> 2 shifts the binary bit of a two places to the right,

0 or 1 to see whether the number is positive or negative.

Symbol in C Language <Yes

Left shift operator (<)

Removes all the binary bits of an operation object from the left and adds 0 to the right ).

For example, a = a <2 shifts the binary bits of a two places to the left and complements 0 to the right,

Move 1 to the left and then a = a * 2;

If the left shift does not include 1 in the Discard high position, then shifts one bit left, which is equivalent to multiplying the number by 2.
Shift right operator (>)

Shifts all the binary bits of a number to several places to the right, and adds 0 to the left of the positive number, 1 to the left of the negative number, and discards the right of the negative number.

The operand shifts one digit to the right, which is equivalent to dividing the number by 2.

For example, a = a> 2 shifts the binary bit of a two places to the right,

0 or 1 to see whether the number is positive or negative.

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.