Deploying ? a trivial little project

realolman

Regular
Joined
Feb 5, 2005
Messages
67
I am trying to make the transition from VB.6 to . NET.

I have made a little program and now I would like to use it on other machines.

It would suit me fine if I could just run it from a CD or something and not have to install it, but I want it to run where there is no VisualStudio IDE.

How do I do that? All the deployment stuff in the help ( help? ) has me baffled.

Thanks

.
 
You just put it on the cd, and double click the .exe! That's the cool part about .NET :)

Just copy everything in your C:\My\Project\bin\ folder to the cd, and then access the cd and double click the .exe. Simple as that afaik
 
Its not quite that simple. Just as you need the VB6 runtime files installed on the destination machine to run a VB6 app, you need the .Net runtime files (the ".Net Framework") installed on the destination machine to run a .Net app. The .Net Framework can be downloaded from Microsoft.com, through Windows Update, or distributed either by itself beside your app (read the licesnce to make sure that this is allowed!) or as part of a deployment package (I know that this is allowed) created with .Net.

I would recommend telling your end user to download it at http://www.microsoft.com/downloads/...e3-f589-4842-8157-034d1e7cf3a3&DisplayLang=en if they don't have it, and let them know that they are in for a wait. It is not a small download.
 
Are there speciific files or something to look for to tell if the .Net framework is already there? Does it come on "newer" machines ? Would it fit on a CD and does it need to be installed or will the machine be able to find it?

Sorry for so many questions, but this seems like a clear different animal than VB6 and it is difficult for me. I feel like I don't know anything and when I try to read it in help, it seems that they never quite tell you anything...always seems to kinda miss the point.
At least it seems that way to me.
Thanks
 
realolman said:
Are there speciific files or something to look for to tell if the .Net framework is already there? Does it come on "newer" machines ? Would it fit on a CD and does it need to be installed or will the machine be able to find it?

It comes in just shy of 25mb. It's large by download standards, not CD standards :D

I don't have .net installed on this machine, so I can't say for sure, but there are numerous files installed to a specific directory... searching for specific ones would help you find if it's there.

I believe the 1.0 framework comes on XP and higher machines and 1.1 comes on XP service pack 1 and higher machines. If you're using Visual Studio 2003, you need 1.1 on the target PC.

realolman said:
Sorry for so many questions, but this seems like a clear different animal than VB6 and it is difficult for me.

Nope, this is exactly what responsible VB5&6 developers had to worry about. It's just that the VB6 runtimes have been on the majority of machines for a while, so most people didn't feel the need to take care of the people without the runtime files.


realolman said:
I feel like I don't know anything and when I try to read it in help, it seems that they never quite tell you anything...always seems to kinda miss the point.
At least it seems that way to me.
Thanks

Welcome to change :D

In the world of computers, technologies evolve and you either keep up or get left behind.

Dot Net is change on multiple areas at once. The basics of the language have changed the most in the last few editions of Visual Basic, the concepts for having a framework have changed radically (much more similar to Java now) and it's now an Object Oriented Language.

Much of the help files doesn't deal with one single "How do I do..." because thats not how OOP works. There are pages in the help file like that, but further between the many which describe the objects. They deal with objects and what they are. You can use an object for many things in many other objects (even if they're made for a specific object/control).

So often when you find something, you have to learn more than what is just on that page. You have to learn what will be reading/accepting/collecting that object and displaying it, etc.

It is a big change, but the best bet is to see if you can get it, then come here and ask about parts that don't make sense.

Honestly it took me 3 days to get an application up and running with ADO in VB6. Took me closer to 3 weeks (I think longer) before I pieced together how Datasets worked with datatables and updated and filled and filtered, etc. By the way 2005 is much more user friendly in database.
 
Hi IngisKahn,

Some of my customers are still using dialup networks in remote areas of the US. 25 megs + my program's 18 megs is huge to them.... 2.5 gigs is forbidden.
 
Just a note. Windows Xp does not come with the .Net framework. I don't know if sp1 or sp2 does.
 
marble_eater said:
Just a note. Windows Xp does not come with the .Net framework. I don't know if sp1 or sp2 does.

XP Home on my dell came with .Net Framework 1.0 and the XP Pro Discs we had at a bank I used to work at all had 1.0 as well.

I'm not sure why any XP discs wouldn't have 1.0 on it.
 
The distribution is a variable. A Dell Windows distribution may come with the .Net Framework. Others may not. It may also depend on the date of the distribution. Just keep in mind that having Windows Xp does not guaruntee the presence of the .Net framework.
 
.Net Framework came with SP2. Before that time you can't guarantee whether it was on the installation or not (it did not come with XP originally). See this post for more information on how to determine if the .Net Framework is already installed.
 
Maybe it's just me, but doesn't anyone else think this is an awful lot of screwing around?
Why does this have to be so obscure and complicated?

This is truly the best MS could do?!?
 
Could not find vbrun400.dll
Could not find msvcrt60.dll
This application requires the Java Virtual Machine to run.

Updating runtimes is hardly a new development.
.NET is included in Windows Update, what more would you have MS do?
 
I don't think vbrun was nearly as large or difficult to identify as this stuff seems to be. Go back and read the posts and follow all the links. There seems to be a good deal of confusion, for such a common task.

What would I have MS do?

I have some books for earlier versions of Basic and VB that were to the point and I was actually able to understand. It's how I learned the little I know. I would have MS write some of those for VB.NET.

I would have MS not change the language arbitrarily. At the simplest level, what is the necessity to change Text1.text to TextBox1.text? Why can't I "print" if I want to? Why was it necessary to get rid of that? Why do vertical scroll bars have to use negative values? Why so obscure how to change the appearence of Scroll Bars? You gotta buy a 3rd party support?!? Where's the serial comms?

I may not be the sharpest knife in the drawer, but I don't think it should be necessary to go through the stuff I see in this thread just to be able to use my trivial little program on another machine. I think MS is smarter ( or certainly should be ) than that.
 
The basics idea is not that difficult - if the framework is not installed already then install it.
As to the renaming of Text1 to TextBox1 that only matters if you never changed the controls from the default names...
 
By the way, if the framework isn't installed on a machine you try to run your app on, a message box will pop up and say something like "You don't have the .Net framework, go to this link to get it," and then it will show a link that pipes you directly to the Microsoft site. That was my first introduction to the .Net Framework and my first step into a larger world.

Complicated? Only if you weren't expecting it. Let's face it, if your computer is patched and up to date (as it should be) there shoudn't be any issues. You can simply run the exe off the CD if you wanted to. Assuming there are no other dependencies (if you use other libraries that aren't .Net, but I'm sure you don't in this app), that would be all you needed. You should start to think of the .Net Framework as being part of the operating system, becuase it is.
 
As far as why there is no magic Print or Line command (with mysterious specialized syntax), it is because .Net is fully object oriented and consistent. Default instances and output functions that do not even belong to any particular class simply do not make sense in .Net. It might be an bit less convenient, but I think that it is worth losing the somewhat archaic Line method to get a language that can work in the common language system and therefore offer the advantages of the .Net libraries, garbage collection, etc.
 
realolman said:
I don't think vbrun was nearly as large or difficult to identify as this stuff seems to be. Go back and read the posts and follow all the links. There seems to be a good deal of confusion, for such a common task.

If it doesn't run, you install it. There isn't any confusion there. Anything .Net won't run without the .Net framework.

The only confusion I saw in this thread was which Operating Systems came with which version by default install off a disk.

The size isn't really any larger than the VB6 runtimes in comparison. When I had to download the VB5/VB6 runtimes to run apps as a user, back in the day, I had my fast 14.4 modem (yes, 28.8 was top of the line) and it took me like 10-20 minutes to download or something like that.

Now everyone has 56k, ISDN, Cable or faster. The .Net framework takes 2 minutes to download with Cable.

Also, the VB6 runtime was 1mb, 1/700th of my Hard Drive (about 700megs). My laptop has a pretty small HD of 30gigs now (my external drive is 180gig and my desktop I got 5 years ago had an 80gig hard drive) so that makes the 25/30,000th or 1/1,200th of my hard drive. About half as much relational space.

What would I have MS do?

I have some books for earlier versions of Basic and VB that were to the point and I was actually able to understand. It's how I learned the little I know. I would have MS write some of those for VB.NET.

There are a ton of books for VB.net, .Net in general and other .Net languages. You have the basic beginners books that treat you like a noob and books that just reference things and assume you understand the concepts of programming.

I would have MS not change the language arbitrarily.

Good, they havn't. They made changes to make .Net compatable across languages (C#, J#, C++.Net, Delphi.Net, VB.net) and to make it a truely Object Oriented language.

At the simplest level, what is the necessity to change Text1.text to TextBox1.text?

What is the name of the control? It's a textbox. Default names should reflect what it is. You shouldn't have to guess what Text1 is.

Why can't I "print" if I want to?

Because that was one of the most arbitrary and annoying parts about VB6. In our class it screwed up half the class trying to remember which controls used .text or .print and why would there be a name.

This is also now Object Oriented. Every control that has text has a .Text method. You can stroll through your collection of controls on a form and assign/read all of the objects .Text methods wether they're Textboxes, maskedTextboxes, Forms, labels, groupboxes, etc.

The point is to adhere to a standard for all controls.

It's also a bonus that students now just have to remember that .Text is text and not have to remember another arbitrary method.

Why do vertical scroll bars have to use negative values?

Why not? It makes sense for what they do. Honestly you could make an inherited control in like 3 minutes that uses positive numbers instead. Thats why OOP is so popular and powerful. But that control with such an arbitrary change would confuse other programmers who were to try to use it.
 
Last edited:
Deneas:
"In our class it screwed up half the class "

What class are you talking about?

That seems to be exactly the kind of stuff I mean

Yeah, there are lots of books and help topics, but they do a poor job of conveying useful information. I know I'm not that stupid. ( yeah, there's an easy shot wise guys, let 'er rip ) Volume is not quality. If that's the best they can do, it's pretty pathetic.

This stuff takes way more screwing around than it should. That's the bottom line.

I think a programming language should empower you to use your computer to do things you want... not spending inordinate amounts of time trying to figure out a bunch of obscure crap.
 
Last edited:
realolman said:
Deneas:
"In our class it screwed up half the class "

What class are you talking about?

A few years years ago I learned every scrap of VB6 I knew in an "Intro to programming course". Well I ended up liking it and learned it all from the book.

The book was used for two semisters of the class (intro 1 & intro 2) and I had the whole book done before Intro 1 was over.

The 1st class covered VB6: Variables, logic, loops, Arrays - just the most basic stuff.

Anywho, it was a requirement for some non-programming majors as well - or one of the choices for them. I'll say that maybe half the class had problems with programming in general, but a bit more than half the class was constantly confused by the .Text & .Print thing. When we did things in class people were like randomly guessing. They honestly didn't know which controls had which properties. And I'm sure there was some reason for the VB developers, but it didn't matter. There wasn't a reason for anyone using VB6.



That seems to be exactly the kind of stuff I mean

Yeah, there are lots of books and help topics, but they do a poor job of conveying useful information. I know I'm not that stupid. ( yeah, there's an easy shot wise guys, let 'er rip ) Volume is not quality. If that's the best they can do, it's pretty pathetic.

I'm not going to take a shot and I don't believe that you're stupid in the least.

What you just said was painfully ignorant though. There are a lot of good books. Don't start flailing around and lashing out at all the pathetic books that are out for .net because I doubt you've read them all and are in any position to accurately judge that.

After my "Intro to programming" courses, we also had a Java OOP course & an assembly course. So I know a bit of VB6... I know a bit of Java, though I got a B+ in the course and finished all the projects, I don't see what they were getting at with OOP.

My boss at work wanted me to do a programming project while I was interning as a systems administrator at a bank. I told him to get me VB6 and he got me VB.net. I'll tell you I was fricking confused.

I told him and he got me VB.Net Complete.

Since then books, online papers and these (and the Visual Basic) forums have been entirely 100% how I've learned to use 2003 for a few professional paying gigs.

You want to see confusing? ComponentOne components. Great time savers, but they don't work exactly as you'd think by looking at them. You learn by reading .CHM help files and going through a handful of sample projects. Looking back on it now, I think there was a newsgroup or something I could have went to.

The kicker was that I got an O'Reilly book called: "OOP with Visual Basic.Net" which explained the reason why VB.Net is OOP and got throught to me the concepts and reasonings and theories that my Java OOP Class & teacher couldn't/didn't. I've even went back to that java book and it still confuses me the way they explain things.

This stuff takes way more screwing around than it should. That's the bottom line.

That is something we would need examples of.

Being a VB6 user for over a year and going to .Net I can say that quite a few habits I'd had didn't translate over very well.

To this day, I think the thing that still annoys me, that I don't have a complete handle on, is Streams. They seem like a nice more advanced topic. I/O (saving to/from files) was a damn simple thing in VB6. In VB.net it was more involved.

I think a programming language should empower you to use your computer to do things you want... not spending inordinate amounts of time trying to figure out a bunch of obscure crap.

LMAO! You want to see some obscure "crap", don't look at any of the VB languages.

In fact, once you get over the learning curve for any language, it's no longer obcsure. VB6 had a learning curve. VB.net had a learning curve.

The main difference is that .Net is more transparent so you don't have to spend an inordinate amount of time trying to figure out a bunch of obscure crap.

.Net uses namespaces to organize data. Java does (maybe a different name) as well. C, C++, VB6, Fortran, etc - they don't. If you don't know what you want to do, you need to look it up in a book or help file. In VB6 you have help enabled intellisense in which you can browse the namespaces.

VB.net 2005 even has a "My" keyword which has a bunch of common tasks. I havn't had the opportunity to explore it too much yet, but it looks interesting.
 
Back
Top