Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

 

.

Posted

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

  • Leaders
Posted

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/details.aspx?FamilyID=262d25e3-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.

[sIGPIC]e[/sIGPIC]
Posted

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

Posted
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.

 

Sorry for so many questions' date=' but this seems like a clear different animal than VB6 and it is difficult for me.[/quote']

 

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.

 

 

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.

Posted
It comes in just shy of 25mb. It's large by download standards' date=' not CD standards :D[/quote']

 

25 megs is large?

If it was 2.5 gigs I might agree (who wants to wait an hour to download).

:p

"Who is John Galt?"
  • *Experts*
Posted

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.

Member, in good standing, of the elite fraternity of mentally challenged programmers.

 

Dolphins Software

Posted
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.

  • Leaders
Posted
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.
[sIGPIC]e[/sIGPIC]
Posted
.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.
Posted

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?!?

Posted

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?

"Who is John Galt?"
Posted

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.

Posted

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.

  • Leaders
Posted
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.
[sIGPIC]e[/sIGPIC]
Posted (edited)
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' date=' for such a common task.[/quote']

 

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.

Edited by Denaes
Posted (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.

Edited by realolman
Posted
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.

Posted

I guess you told me.

 

Fact is I got the book Object Oriented Programming for Visual Basic.NET on your recommendation about a year ago.

 

I read it completely through. I don't understand it. Maybe I am that dumb.

 

Denaes:

I/O (saving to/from files) was a damn simple thing in VB6. In VB.net it was more involved.

 

 

Why should that have given you trouble? Why would it not get easier in every version? The fact that things do not get easier, but more complicated is what I am talking about...

 

I started this thread by asking how I get my crummy little app on other machines. In VB6 it take 2 keystrokes to make it an .EXE, and I figured it out myself. It couldn't be much simpler. It should be easier in NET. It's a new version. I shouldn't even have had to come here to ask. When I tried to figure it out in Help, I got a convoluted runaround, and nothing useful. I don't understand why you would not have noticed that, when you used it.

 

 

This is one of the help subjects I found when I could not figure out to do it.

 

Deployment Via Distributable Media

The deployment tools in Visual Studio .NET can be used to create Windows Installer (.msi) files that can be distributed and installed on other computers. The resulting installer files can be distributed on traditional media such as floppy disks or CD-ROM, or they can be placed on a networked drive for installation across a network.

 

To deploy an application, you first create a Setup project and set deployment project properties that determine where and how the installer will be built. For deployment via traditional media, you would then copy the .msi file from the build location to a floppy disk or other media. To deploy to a network location, you would create a Web Setup project and add the project output group for the application to the Web Setup project in the File System Editor. After building the installer, you would copy it to the server computer, where it could then be downloaded over the network.

 

Do you really think that this is pertinent, good quality help?

 

Someone who knows how to do it will not be reading help, Someone who does not know how to do it will not get anything out of this. And this seems to be the rule, rather than the exception. I think it should be MUCH better

 

I chased the help links around in circles and never did get anything out of it. Rot13 explained it pretty well.

 

Seems to me Microsoft should contact Rot13 for help on their help.

Posted
I/O (saving to/from files) was a damn simple thing in VB6. In VB.net it was more involved.

 

 

Why should that have given you trouble? Why would it not get easier in every version? The fact that things do not get easier, but more complicated is what I am talking about...

Was it really so simple?
Dim fileNum As Integer
fileNum = FreeFile
Open "MyFile.dat" For Binary As #fileNum
Dim data As String
data = Space(LOF(fileNum))
get #fileNum, , data
Close #fileNum

Compare that to:

Dim reader As StreamReader = New StreamReader("MyFile.dat")
Dim data As String = reader.ReadToEnd
reader.Close

In VB6 it take 2 keystrokes to make it an .EXE' date=' and I figured it out myself.[/quote']It's just as easy to build an EXE in .NET, but be it VB6 or .NET you need to ensure that the user has the runtime installed.

And do you think it's easier creating a VB6 install project than a .NET msi?

 

There's no need to get so defensive; we're trying to answer your questions and concerns, not make you upset.

"Who is John Galt?"
  • Administrators
Posted

It hardly takes a lot of keystrokes to build a .exe in .Net either though, do it straight from the build menu and every time you run the app it is building a .exe - I fail to see how this is harder than VB6.

If you wanted to deploy a VB6 application you still needed to make sure the runtimes were installed (and the correct versions if you had serviced packed your installation), deploying a .Net application isn't any different in that respect.

In regards to Rot13's help - it will only be of use if the destination PC has the framework installed, otherwise it will not run.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

Nothing is hard if you know how to do it.

 

I did not know that the IDE was building the exe every time you ran it. How in the world is a person supposed to anticipate everything MS might have decided to change?

 

 

Denaes posted the "I/O (saving to/from files) was a damn simple thing in VB6" line, not me.

 

My point was that with new versions things should get easier for someone with experience with the product to do... perhaps they did, but they also got considerably different in many ways... which makes it hard.

 

I am, as Denaes points out "painfully ignorant"; and yes, it is painful.

 

It's not that I have any great pining love for VB6, or I wouldn't be here.

It's only a matter of time untill VB6 won't run on anyone's computer.

 

I knew how to read and write to a file, sequentially and random access in VB6 and GWBASIC. You obviously know how to do it, both then and now. I only know how to do it then... and that way no longer works. And that goes for a whole bunch of other stuff as well.

 

I am a simple guy. I have no interest in databases or networks. What I would like to do is use my computer to figure out how many gallons of heating oil I have in my tanks, and collect when and how long my furnace runs, the chimney and the outside temperature and the temperature of the boiler. Stuff like that. I have a I/O board I bought in the eighties that runs on BASIC and would collect things like that. If I could get at memory locations like I could with GWBASIC under MSDOS, I could make my own board.

 

It seems to me that there should be a programming languange that would be easy to use to do stuff like that. As Yosiminte Sam would say, "And that programming language oughta be you (VB)".

 

But nobody uses serial ports any more... do they Microsoft? ( The SAX stuff doesn't work ) To me, MS has thrown out what should have been expanded upon, and changed things seemingly to me, arbitrarily. I am sure you knowledgable people know why it needed changed, but I don't. I don't mean that sarcastically, and I really don't want an explanation... I think they could have kept the old stuff, along with the new.

 

I know I could buy something that would do what the seller wants me to do with it... I have a thing here that - strangely enough hooks up to the serial port - and works fine... if all you want to do is look at a graph of the input voltages. You can't collect any data and use it in variables in a program.

 

I want to use my computer for everyday real world purposes. I don't want to buy something... I want to write something ... like I used to be able to do, only with the newest versions of the language.

Posted
Nothing is hard if you know how to do it.

 

Very true.

 

I did not know that the IDE was building the exe every time you ran it. How in the world is a person supposed to anticipate everything MS might have decided to change?

 

That was in the first chapter or two of the OOP using VB.net book you read from cover to cover.

 

It explained how use the framework's command line interface to build & link .EXE's and .DLLs, basically (and then in more detail) what was happening when you precompiled your data into an IL .exe

 

I'd say that it's the best .Net book I've read overall, but it should be your second or third book, not your first.

 

Denaes posted the "I/O (saving to/from files) was a damn simple thing in VB6" line' date=' not me. [/quote']

 

I agree I'm not the master of VB6 - I could get by on many basic tasks.

 

For all I know I/O in VB6 could have been more complicated than .Net and I never got into it. But...

 

Dim reader As StreamReader = New StreamReader("MyFile.dat")
Dim data As String = reader.ReadToEnd
reader.Close 

 

Is a pretty basic scenario and not really capturing the essence of I/O in .Net.

 

The VB6 Input method was dead simple, though took more steps/lines.

 

In .Net you should learn what your streams are and how to properly configure them, which is more complicated and in depth than any I/O in VB6 I'd done.

 

You can get by in VB.Net I/O with VB6 compatability methods and/or using the defaults, but you're going to see massive performance hits for it on large files.

 

To do it right, it's more complicated. Not hard to learn/impliment, just a few more steps you need to learn.

 

My point was that with new versions things should get easier for someone with experience with the product to do... perhaps they did' date=' but they also got considerably different in many ways... which makes it hard.[/quote']

 

I agree things should be streamlined and they were. Not really harder, just a different way of thinking. An OOP way of thinking.

 

If it helps any, MS is combining commonly used tasks into the "MY" namespace in VB2005. I havn't played with them yet, but I've seen a few time savers.

 

You can do this yourself. If you're, for example, using I/0 in a specific way and plan to use that format more than once, create a class (myIO or something like that) and a Write, Append, ReadLine & ReadWhole functions where you're doing all the fine tuning inside. Feed it a path to read, it'll return a string. Give it a string and the path and have it save/append the string to the path.

 

From then on you only need to declare the variable for the class (myIO or whatever you called it) and then call the method. You still had to learn how to do it, but now it's dead fast.

 

But it's very important to have those options. It's very important to be able to configure your stream and reader/writer, otherwise it won't do what people need and/or it would take up multiple methods and that would make things more complex and messy.

 

I am, as Denaes points out "painfully ignorant"; and yes, it is painful.

 

I knew how to read and write to a file, sequentially and random access in VB6 and GWBASIC. You obviously know how to do it, both then and now. I only know how to do it then... and that way no longer works. And that goes for a whole bunch of other stuff as well.

 

What you said about all .Net books being useless or whatever you said was ignorant. It's pretty clear you havn't fully read a VB6 to .Net or Beginning .Net book. The basic VB.net books I learned on (Mastering VB.Net & Schneiders VB.Net) explained the .exe and framework situation and even compared it to the VB6 runtimes and Java interpreter.

 

They also explained at least the basic concepts & parameters you need for I/O to read/write and append a file.

 

I think you either didn't read basic "intro to VB.Net" books and got bogged down in things you didn't know or just skipped around and didn't read the basic books fully, testing and applying your knowledge as you went.

 

I don't know. It sounds like you know what's going on for some things, but are totally in the dark for others.

 

Like this running an app on another machine. It's a step easier than VB6.

 

You copy the file to a disk (or download it) and if the file doesn't run, install the .Net framework (again, from disk or download it). Same thing you had to do with VB6. The part where .Net is easier is that you don't need to register .dlls with the machine. You can just leave them in the directory with the .exe and copy them over as well.

 

I am a simple guy. I have no interest in databases or networks. What I would like to do is use my computer to figure out how many gallons of heating oil I have in my tanks' date=' and collect when and how long my furnace runs, the chimney and the outside temperature and the temperature of the boiler. Stuff like that. I have a I/O board I bought in the eighties that runs on BASIC and would collect things like that. If I could get at memory locations like I could with GWBASIC under MSDOS, I could make my own board. [/quote']

 

That sounds really cool, and somewhat beyond my comprehension of GWBASIC or even VB6.

 

I don't think trouble with this is so much a .Net thing as the fact that newer computers don't support it, so MS isn't supporting it. My desktop and laptop don't have serial ports, just USB & Firewire.

 

I'm not sure how dead Serial is, but you'll have that problem with anything newer... New technologies only support dead/dying technology up to a certain point.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...