Get the App
SLTechnology News&Howtos  ›  Development  › 

Example Analysis of VB.NET Project conversion

Shulou Source: shulou.com Published: 2022-06-02 08:56:53 11月01日 Update

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!

Tags: Projects addresses articles compilations types examples analysis two tools examples guarantees events values elements interests accuracy functions parameters and at the same time names Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology NVidia vpn Apple Linux