Break VB6 project into chunks to use free version of Artinsoft

后端 未结 2 600
萌比男神i
萌比男神i 2021-01-29 13:45

I am trying to convert a large (200K lines) VB6 project into C#. I only want to convert the form design because I want to rewrite all the actual code in C#.

I want to us

2条回答
  •  孤街浪徒
    2021-01-29 14:12

    I would advise against using a converter for the UI. It may seem trivial, but there are features that simply do not natively exist in .NET (control arrays without a wrapper for a big one). And the control wrappers it creates are not fun to use nor maintain.

    VB6 does not port well; the UI nor the code. If you were to continue down this path, there are things that can help.

    1. Remove all unused forms and code
    2. Ensure there are no control arrays and if there are, correct related code
    3. Get all logic wrapped in classes
    4. Ensure you are not calling/loading/referencing forms directly and that you are using an instantiated object
    5. Ensure good encapsulation practices are in use and good object oriented design patterns

    I would seriously reconsider conversion. Converted code/UI sounds great, but in my bad experiences with VB6 conversion, there are so many problems because of how bad VB6 allowed developers to be and features that simply don't exist anymore.

    Do yourself a huge favor... Start a new project, create a custom control library that inherits from the standard controls you use, and use those everywhere. Don't like the way Cliptext works on a masked textbox in C# versus VB6? Extend it or override it. Want all your listviews to be sortable? Easy, single-point implementation. Find out in a year that the business wants spell checking on 90% of textboxes? Easy.

提交回复
热议问题