|
-
Oct 19th, 2009, 10:23 PM
#1
Thread Starter
Fanatic Member
"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.
Last edited by teguh123; Oct 19th, 2009 at 10:35 PM.
-
Oct 20th, 2009, 12:33 AM
#2
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.
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.
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Oct 20th, 2009, 03:23 AM
#3
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?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 20th, 2009, 06:05 AM
#4
Re: "My way" of using VB6 don't work on VB.net
 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?
-
Oct 20th, 2009, 06:42 AM
#5
Re: "My way" of using VB6 don't work on VB.net
 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
-
Oct 20th, 2009, 10:53 AM
#6
Thread Starter
Fanatic Member
Re: "My way" of using VB6 don't work on VB.net
 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.
-
Oct 21st, 2009, 02:43 AM
#7
Hyperactive Member
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.
-
Oct 21st, 2009, 08:58 AM
#8
Thread Starter
Fanatic Member
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?
-
Oct 21st, 2009, 11:50 AM
#9
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.
My usual boring signature: Nothing
 
-
Oct 21st, 2009, 01:28 PM
#10
Fanatic Member
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
Platforms of choice: Visual Studio 2005/2008 Professional : Visual Studio 2010 Enterprise : PHP - Notepad++/WAMP
Please Rate If I helped you. 
Please remember to mark threads as closed if your issue has been resolved.
Reserved Words in Access | Connection Strings
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|