Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of VB.NET Project conversion

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces the VB.NET project into an example analysis, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

1. Install any tool that can compile and debug. Net projects, recommend two free

A.SharpDevelop2, download address http://www.icsharpcode.net/OpenSource/SD/Download/

B.Visual Studio Express Editions, download address http://msdn.microsoft.com/vstudio/express/support/install/

two。 Make sure that both .net1.1 and .net2.0 runtime are installed

A.net1.1 runtime download address http://www.microsoft.com/downloads/details.aspx?FamilyId=262D25E3-F589-4842-8157-034D1E7CF3A3&displaylang=en

B.net2.0 runtime download address http://www.microsoft.com/downloads/details.aspx?familyid=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&displaylang=en

3. Download and install vbtocs tools from http://www.vbconversions.net/download.html

4. Convert with vbtocs: before any VB.NET project is converted, make sure that the project has been compiled locally, which will improve the accuracy of the conversion.

5. Open the converted c # project to compile and debug

6. Here are the troubleshooting steps after converting the VB.NET project in AutoCAD ObjectARX 2007\ samples\ dotNet to C #--

a. Modify the paths of the two assembly (acdbmgd.dll, acmgd.dll) of cad in the project file

b. Uncomment all classes on the audesk namespace using

c. Manually add assembly: ExtensionApplication and assembly: CommandClass attributes as needed

d. Replace all System.CLSCompliantAttribute.Autodesk.AutoCAD.Runtime or System.Type.Autodesk.AutoCAD.Runtime with Autodesk.AutoCAD.Runtime

e. Replace all OpenMode with Autodesk.AutoCAD.DatabaseServices.OpenMode

f. The compiler corrects errors according to the prompts, mainly including--

◆ performs mandatory type replacement

◆ must add ref to the byref of vb where it is called.

◆ will change the collection element reference in the form of bt.Item (BlockTableRecord.ModelSpace) to bt [BlockTableRecord.ModelSpace]

◆ break transformed from Exit Try will be replaced by return

◆ C # is case sensitive

◆ replaces the System.EventHandler type with the correct event type. Here, you can use the corresponding function to implement the partial parameters.

For example: get PromptSelectionResultEventHandler from PromptSelectionResultEventArgs

Thank you for reading this article carefully. I hope the article "sample Analysis of VB.NET Project conversion" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report