none
Using an old project RRS feed

  • Question

  • In Visual Basic 6 it was very easy.

    How can use an old project, as a starting point, to develop a new one?

    How can I load it in a new project? Or how can I change directory/name to an old one?

    Sunday, July 7, 2019 2:18 PM

Answers

  • Thanks Tommytwotrain

    you said what a needed, in a simple way.

    I can add that to change even the  name of sub directory you have to edit the file.sln (a text file) and change in it the name of directory.

    Ciao enzo

    Monday, July 8, 2019 4:19 PM

All replies

  • Hello,

    The honest reply is to start new with VB.NET rather than attempting any type of conversion. Many reasons, first is that VB.NET is a total different architecture than VB6, there are depending on you code some aspects which may port to VB.NET but not much. 

    Note if you do decide to port using the old project as a model, things like accessing data is done totally different than in VB6 to VB.NET. Also third party controls usually fail when attempting to use them in VB.NET, same goes for standard VB6 controls and components.

    Bottom line is don't attempt a conversion, seen to may fail with the same information I provided above, they don't believe until after a conversion attempt fails. 

    Have the VB6 project open in old visual studio to model after in the new project.


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange


    Sunday, July 7, 2019 2:52 PM
    Moderator
  • Hi

    I do not have any experience in trying to do that. However, what I can say is that I have seceral projects started back at VB.NET 2010(ish) and have been rewritten several times each as I learned, improving every time.  The end result I am trying to say is that a complete re-write may be a better option rather than trying to import/fix old code. You also benifit in learning more of the new environment as you go.


    Regards Les, Livingston, Scotland

    Sunday, July 7, 2019 2:52 PM
  • In Visual Basic 6 it was very easy.

    How can use an old project, as a starting point, to develop a new one?

    You haven't given any specifics whatsoever about the tasks/features that you
    found "easy" in VB6 that you are looking to move to VB.NET so specific suggestions
    are not possible. The general advice already offered by others here is sound.

    However if you want to research various alternatives you may find some useful tips here:

    Migrate Your Visual Basic 6.0 Application
    https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-basic-6/visual-basic-6.0-documentation#migrate-your-visual-basic-60-application

    The other sections on that page may also help put some of the differences and
    new capabilities into focus.

    Visual Basic 6.0 Resource Center
    https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-basic-6/visual-basic-6.0-documentation

    - Wayne

    Sunday, July 7, 2019 4:00 PM
  • Dear friends, thanks for your advices.

    In software you know is very common not to write again all but, to start from a previews version an modify it.

    It seems impossible that VBnet cannot do it.

    Sunday, July 7, 2019 5:28 PM
  • Dear friends, thanks for your advices.

    In software you know is very common not to write again all but, to start from a previews version an modify it.

    It seems impossible that VBnet cannot do it.

    Hi

    I would think it is MORE common rto start all over again as the issues encounteredin trying to convert could be really difficult to deal with if you just try to brute force some solution.


    Regards Les, Livingston, Scotland

    Sunday, July 7, 2019 5:52 PM
  • To start all over again????

    If you have to change from version V23.4 to version V23.5 you write your software again?

    I think i have not explained well my simple question.

    Sunday, July 7, 2019 7:40 PM
  • To start all over again????

    If you have to change from version V23.4 to version V23.5 you write your software again?

    I think i have not explained well my simple question.

    Hi

    No, that is not what I meant. You are talking of a major conversion berween 2 systems that have very little similarities and many many differences. This is a completely different scenario to what you say about going from v23.4 to v23.5.


    Regards Les, Livingston, Scotland

    Sunday, July 7, 2019 7:58 PM
  • Hi

    You know what to for doing what i said?

    I tried changing name of directory but this is not accepted, gives error.

    Starting a brand new project I do to know how to load previews software.

    Ciao, Enzo

    Sunday, July 7, 2019 8:03 PM
  • Dear friends, thanks for your advices.

    In software you know is very common not to write again all but, to start from a previews version an modify it.

    It seems impossible that VBnet cannot do it.

    Even Visual Studio was rebuilt from the initial release, same with many other things that developers work with along with Visual Studio.

    In regards to not write again, that is untrue, more developers start from the ground floor than jury-rig an old application in regards to VB6 to VB.NET.


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Sunday, July 7, 2019 11:02 PM
    Moderator
  • Hi

    You know what to for doing what i said?

    I tried changing name of directory but this is not accepted, gives error.

    Starting a brand new project I do to know how to load previews software.

    Ciao, Enzo

    If you are attempting to change the name of the project folder this must be done with anything that is open that may be using the folder e.g. Visual Studio or even two Windows Explorers currently viewing the same folder.

    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Sunday, July 7, 2019 11:04 PM
    Moderator
  • I see you also asked How to change directory name and project name of existing project. It sure appears to me that this is the same problem so it makes extra work for people trying to help you to create two questions for the same thing.

    This question is confusing. You say load it in a new project and you say to an old one. So this question is too vague and I think your other question will provide the answer(s) you need.

    Oh, yeah; you say you want to use a VB 6 project. Well Karen is experienced with that but as best as I remember VS will issue messages when you try to use VB 6 with VB.Net. The conversion will likely be a lot of work but at least VB.Net will tell you what needs to be fixed.



    Sam Hobbs
    SimpleSamples.Info

    Sunday, July 7, 2019 11:09 PM

  • In software you know is very common not to write again all but, to start from a previews version an modify it.

    It seems impossible that VBnet cannot do it.

    You need to keep the chronology of the compiler versions in perspective when
    looking for comprehensive support for migrations. MS and other compiler vendors
    will usually provide extensive assistance and conversion support when releasing
    new versions of compilers and related tools. So when VB.NET first came on the
    scene there were extensive resources made available for developers who wanted
    to migrate from VB6.

    But when you skip over multiple versions of VB.NET - and *many* years - then
    integrated and supported facilities and resources for migrating from a much
    older version of the compiler - and the language - diminishes.

    VB6 was released in 1998. In 2008 Microsoft stopped supporting the Visual Basic
    6.0 IDE. (That's ten years during which it was supported.)

    VB.NET was introduced in 2002.

    MS maintained support for *running* VB6 applications for many years after VB6
    itself was obsolete. In short, developers have had 15+ years in which to
    migrate VB6 applications to VB.NET. Expecting MS to provide support for
    building VB6 applications and automatically converting VB6 projects in every
    new release of VB.NET indefinitely is simply unrealistic.

    - Wayne

    Monday, July 8, 2019 2:34 AM
  • In Visual Basic 6 it was very easy.

    How can use an old project, as a starting point, to develop a new one?

    How can I load it in a new project? Or how can I change directory/name to an old one?

    If you are talking about a project in Visual Basic 15 to another project in Visual Basic 15

    The same as in Visual Basic 6, go to File explorer (the newer name for windows explorer)

    Depending on what point you are copying it is possible you have to do some editor changes of the .sln file. 

    Likewise VB6 you cannot do this with Visual Studio.


    Success
    Cor

    Monday, July 8, 2019 6:55 AM
  • Hi,

    I repeat here again what i wanted to do. I hope someone will understand.

    I make this example:

    We are in VB.net environement. 

    I have developed an app that is in directory xxx, with name yyy, that works faithfully.

    Now I have to make some change (change the color of a background for ex.).

    I will call the new app yyy_V2 and i do not want to touch the previews yyy.

    For this purpose I intend to develop changings and store all project in  a new directory, say xxx_v2.

    Of course I will not write all from the beginning, but i will work on a copy of version yyy.

    This is what i have done from a lot of years, since machine language with 8080.

    Is there someone that knows the way to proceed? When you change something and make a new version of an app, how do you proceed in VB.net?

    Thanks.

    Monday, July 8, 2019 8:11 AM
  • In vb.net we can just change the name of the project folder. You can also change the solution name. Other name changes are not required nor easy.

    In windows file explorer make a copy of the project solution folder as shown:

    change the name of the folder copy:

    Change the name of the solution if desired:

    If you want to change the project version do that in the project properties assembly:

    If you change the assembly name that may or may not cause other issues best to leave it. Don't name it with a version number as I did or you might not be able to change it later.

    Do not change the names of any sub folders etc. unless you understand how. It is noramally not required for anything. Just leave it.


    PS This is really a how to use Visual Studio question perhaps ask in that or other forums too.
    Monday, July 8, 2019 8:45 AM
  • Thaks a lot, i will try do do this.

    Enzo

    Monday, July 8, 2019 9:19 AM
  • Hello, 

    > started back at VB.NET 2010

    There are a big difference between migrating:

    from one version of .Net to another version of .Net

    and migration

    from none-.Net something to .Net. 

    Nearest example - migrate from PureC to C++.



    Sincerely, Highly skilled coding monkey.

    Monday, July 8, 2019 9:44 AM
  • >If you have to change from version V23.4 to version V23.5 you write your software again?

    May I ask - did this changes from V23.4 to v23.5 mean that you relocate your software from Windows to UNIX? 

    Migration from VB6 to VB.NET is similar to migration to a different system - .Net code are running on their own VM, 


    Sincerely, Highly skilled coding monkey.

    Monday, July 8, 2019 9:51 AM
  • >Now I have to make some change (change the color of a background for ex.).

    Usually, in .Net, you make a base class(classes) for all used elements and change background color (& etc) in it.

    Opss... OOP part of VB6 are very different from VB.Net... so, if you are VB6 programmer you would not understand what need to be done.

    Is there someone that knows the way to proceed?

    Yes. 

    1. Learn .Net and .Net-based technologies (EF6, LINQ, Template, TEST & etc). Learn in depp. 

    2. Take  GUI of your VB6 project and assemble the same forms in .NET.

    3. Replace what didn't work in forms with something what works.

    4. Start replacing your BO & DAL layers for assembled forms.

    Of course I do understand that in VB6 you most likely didn't have separation for GUI, BO & DAL. You will need to separate them in .Net or you would not be able to use most of .Net benefits.

    I currently have app 2 Gb of NET sources written in VB.NET, but in VB6 style, and do not have a chance to fix some bugs in this code unless I rewrite VB6 style to VB.NET.

    >since machine language with 8080.

    If you known the difference between 8080 and 8086 - migration VB6 -> VB.NET looks like adapting 8080 assembly code to 8086 - something works, something didn't.


    Sincerely, Highly skilled coding monkey.


    Monday, July 8, 2019 10:17 AM
  • Thanks Tommytwotrain

    you said what a needed, in a simple way.

    I can add that to change even the  name of sub directory you have to edit the file.sln (a text file) and change in it the name of directory.

    Ciao enzo

    Monday, July 8, 2019 4:19 PM