"My way" of using VB6 don't work on VB.net
I have this great way to use VB6
I treated my project like a .exe file.
Say I want to work on c:\work directory.
I just save as the .vbp file to c:\work directory
All the other files (.frm,.bas,.cls) files are in a special directory called library
ALL of my .vbp files, in c:\work1, c:\work2, c:\work3 refer to that one same directory.
How can I do that in vb.net?
Why this is important? Bugs always happen all the time. If I just run .exe file, when bug happen, I cannot do a thing. However, if I run the project file and run the program in debug mode, when bug happen I can figure out what happen.
Re: "My way" of using VB6 don't work on VB.net
I am thoroughly confused about what you want. It could just be me, but I'm not sure.
If you want to change the directory of your project, just move the project folder to where you want it.
The executable has nothing to do with the development part of your project, so you shouldn't worry about it until release time.
Quote:
Why this is important? Bugs always happen all the time. If I just run .exe file, when bug happen, I cannot do a thing. However, if I run the project file and run the program in debug mode, when bug happen I can figure out what happen.
Are you talking about debugging errors? Typically you'll always want to run the app in debug mode to figure out what the issue is because VS will point to the error and give you an explanation.
Again, I'm not sure if any of this applies, because I'm not entirely sure I understand what you're asking.
Re: "My way" of using VB6 don't work on VB.net
Are you trying to create a centralized folder with all your "library" code which you want to reference from any project/solution you create?
Re: "My way" of using VB6 don't work on VB.net
Quote:
Originally Posted by
weirddemon
I am thoroughly confused about what you want. It could just be me, but I'm not sure.
It is not just you...I'm confused here as well.
What is it about how .NET works that you don't like?
Re: "My way" of using VB6 don't work on VB.net
Quote:
Originally Posted by
Hack
It is not just you...I'm confused here as well.
What is it about how .NET works that you don't like?
Me three.
Very confused!!
Can you perhaps provide some more information, perhaps with the aid of screenshots, or actual examples that will help better illustrate the problem that you are having?
Gary
Re: "My way" of using VB6 don't work on VB.net
Quote:
Originally Posted by
RobDog888
Are you trying to create a centralized folder with all your "library" code which you want to reference from any project/solution you create?
YES
In vb6 I just put the .vbp file in the same folder where the .exe file should be.
Say I want a program that read a file from "current working" directory and display the content in a text box. The location of the .exe file will be in the place where the directory is right?
Now in vb6. I just put the .vbp file on the same directory (I can't just copy, need to open another .vbp file and then save as project). Then I open the .vbp file press run and it's equivalent with running the .exe file
Except that of course I have the whole power of the debugger.
Re: "My way" of using VB6 don't work on VB.net
You can consider manually editing the .SLN or .VBPROJ file, though I'm not sure that's the best way to get it done.
Odd indeed. :D
Re: "My way" of using VB6 don't work on VB.net
Actually I did it. There is another way to do it too, namely make a new project and then add all the necessary files and references. Unlike in vb6 you can't save as project.
Another bummer. Also you can't edit and continue using linked source. Sucks. Why Microsoft? Why?
Re: "My way" of using VB6 don't work on VB.net
If I understand you right, one of the problems you had was that whenever you add an existing item into a new .NET project it actually copied the file into that project, where you wanted to keep all those items together in one folder. There was a solution to this, though I totally forget what it was, but since I may not even be understanding you correctly, it probably doesn't matter.
The reason for this change is obvious enough. They wanted each project to stand alone. If you are the sole developer, you have organizational options that don't exist for teams. You generally don't have to worry about somebody else tampering with your file and breaking a program that was working.
Of course, you could also actually make a library, which you could then link in. You can certainly step into that code, but, as you noted, you can't edit and continue for the simple reason that it would be absurd to do so. MS was trying to make the system more stable for team use, which means that people can freely tinker with the code in their project, but not freely tinker with the code that is shared between projects. It's not bad, just different.
Re: "My way" of using VB6 don't work on VB.net
Here is something else.....
If there is an external file, dll, image, etc that you want to keep with your project at all times, then right click on your solution name and click on add --> Existing Item. Find the file you want and add it to your list. Then in solution explorer, right click on the file and then choose properties. Under properties there is an item that is called "Copy to Output Directory" with 3 options: Do Not Copy, Copy Always and Copy if Newer. This guarantees that the file will stay with your project. This is particularly useful if files are always shifting around or you make specific changes to files for various projects because you will always have the correct ones with your project.
D