How to edit a VB program?

Ok for those of you that know VB, I had a friend of mine make me a small template program for a robot control software. It’s an exe file and a cfg file. The cfg only contains a baud rate and port value. I’m curious where the VB code is for the GUI? Do I have to decompile the exe to edit or add to the VB code? He said he made it in VB and the setup file I used, was called a VB bootstrap setup or something? It installed the exe and cfg file from a library cab and also installed some windows dll files.

I downloaded a Visual Basic editor but I don’t understand where the code is for me to edit??

I’m so lost…and hopeless… :cry:

I just don’t get it.

My guess is he didn’t send you everything you need. The VB code is in either a .vbp or a .bas file, but usually there is a whole slew of files, .vbp (visual basic project), .frm (form files), .mod (modules), .cls (classes), etc.

Just a note, VB has already been EOLed by M$, so you shouldn’t try to learn it. If you must learn Windows, I’d try to pick up a book called Practical Visual C++. I had 6.0 and with a trial version of Visual Studio I was able to do most simple GUI stuff and work with a real programing language.

um, unless I am missing something too, he probably needs to send you the source file(s).

Ahh yes, there was a folder in the Ace archive I missed. It has a bunch of other files in it. DUH.

LOL, thanks guys.

I assume this is VB6, or else you could decompile it. I would expect .NET to be a bit large for most robot projects because of the runtime, but even VB6 had the virtual machine, which wasn’t too small.

Don’t worry about VB, it’s alive and well.

Just because Microsoft declares something is at its end of life and they won’t support it anymore, does not mean it won’t still be useful to people. I am betting there is a very alive and active Visual Basic user community out there. :smiley::smiley:

8-Dale

Not to get into another arguement, but M$ is trying to do everything they can to make people switch to their .NET version of VB (essentially C# with VB style interface). There are a lot of reasons for this, the main reason is because so many corporations started making large scale projects in VB (VB was meant as a hobbiest or quick develop language) and then getting anrgy and increasing support costs when things went wrong.

Also the general consensus with people who program for a living or are in some other part of IT is that VB produces sloppy programs and bad programers and should be avoided like the plague. Unfortunately the bosses read the propoganda which said VB makes development fast and forced lots of projects into VB. If this is the first programing langauge you think you want to learn, please don’t. It may help the beginner slighly, but will become a big liability later on.

I highly suggest you learn either C++ (for GUI stuff), C (for everything else), or if you really don’t want to learn a variant of C, try Pascal, PHP, or Java instead. Honestly, knowing C will help you the most as 90% of things are in some variant of C. The new hyped languages like Ruby, Ada, Python, or the clean computer scientist languages like LISP, Forth, Haskell, etc. are not really useful.

I’d be willing to agree with the first sentence, but the rest of the first paragraph and the entire second paragraph is laughable. That wasn’t the reason MS switched from VB6 to .NET (which was my brother-in-laws project for the first release). The idea behind .NET was a write once run everywhere project which might supplant Java, and was driven by the recognition that the internet was likely to drive the direction of software in the near future. Java never worked quite as promised, and I don’t expect .NET to, either, but that’s another issue.

You might also be interested to hear that MS was intending a VB6.5 (which suggests that they were not too upset about all that sloppy programming :wink: ), but decided to go for VB7 instead (which became VB.NET) to “put all their wood behind one arrow.”

VB certainly was developed for RAD (rapid application development), but it also happens to be one of the biggest languages in the world. As for your consensus from people who program for a living…well, I am one, am associated with many, am related to many…and I have not the slightest idea where you got that opinion from.

I agree that you should start in C/C++, or ASM (I went ASM - C - C++ -VB - VB.NET). By following a path like this, you are moving from the lower level through the upper levels. There may be some advantage in skipping either C or C++, depending on whether you intend to end up in an OO language or not. Also, C, with the tight code it compiles to, is still favored for embedded systems (like most robots). However, if you already have code in VB, then presumably you can use VB, and there’s nothing wrong with that. By moving to VB from C, you would learn some of the underlying hardware, and some of the rationale behind the design of VB, but several tens of thousands of programmers world wide have started in VB, and remain there, so don’t worry about that.

By the way, a good resource for VB (ClassicVB), VB.NET, C#, C, C++, and several others, can be found at:

www.VBForum.com

I’m only relaying what I’ve heard from the various University ITS staff members who I’m friends with. I used to work for campus IT as an undergrad and the number one compliant they have is new programers (CS graduates from other schools) who’ve only really worked with VB just don’t know how to program. Usually they have a little Java but mostly come from theory colleges, where CS is taught as algorithms and math and not application colleges which actualy teach how to code. The second biggest complaint is the bosses want to use VB (why they hired these people) for projects it was not designed for, like interfacing to our Oracle database, or making the backend for our new e-mail system. Considering I’ve looked at some of the crappy code these people produce, sprawling, non-commented, no clue about whitespace style, etc. I can only agree.

I’m not going to disaggree that the theory for .NET and managed code was much more than just to get rid of VB, but the reason I was told for VB.NET was to try to get rid of as many of the bad practices and clunkly libraries as possible. Finally, I know the disdain and such opinions of VB are not limited to my school. Slashdot has lots of people in IT and they seem to have quite the dislike for VB as well.

That said, if you know VB and need to write small programs quickly, then by all means use VB. However, if you are looking for a programing language to learn, you probably want to look elsewhere.

Well, I certainly agree with the underlying part of what you were saying. I don’t think VB is a very good first language partly because it is so simple. It is very easy to write a simple program in VB, which means that people can learn poor practices. However, I recently participated in a debate about that, and nobody could point to bad habits that were specifically due to VB. Bad practice all seemed to come from other sources which could be equally bad in all languages.

I was surprised to hear my brother-in-law ripping OO design concepts a year ago when we were on a hike. I had personally disliked the use of OO in the fashion he was describing, so I was glad to hear that he was pretty down on it. However, it just goes to show that there are serious arguments against pretty much every programming language and practice.

Another example is that while MS uses C++ (though the next office is supposed to be written in .NET), they don’t use the whole language, but rather they use what they call a “rational subset”. That’s my biggest argument against that language. The thing is so enormous that few people know it all, or can use it thoroughly.

Basically, disdain is present for pretty much every language. I have read several debates on this language or that language, and the fact is that if you know how to code well, VB6, .NET, C, and C++ are all about the same in what they can do, they just differ in how hard it is to do it. Having said that, I would also add that C/C++ will create smaller exes, which can run faster, but that almost never matters in business software. You really shouldn’t have any difficulty doing any database interfaces in VB6, .NET, or any of the others. However, if you write like crap, you end up with crap.

As for me, I switched to .NET, and have never gone back to VB6, though I loved it at the time. Oddly, while .NET was supposed to get rid of dll hell, it’s hard for me to say that it succeeded so well. The only place for C/C++ that I can see is either in those cases where you have no other choice, or games where every cycle counts. However, for my current project, where a “brain” that controls a small robot, will be spread across either two or three computers using two databases, the whole thing will be written in .NET, because it comes together fast and easy. Just got the interface modules finished this evening, and will probably get the driver module, UDP communications, and possibly the orienteer modules done tomorrow…except for that little football game which will wreck the afternoon.

These people who complain like this are blaming the language for the bad code. VB is just one of many programming tools. It’s the programmers or their instructors who should take the blame for not writing good code. A person can write bad code in any language, including C/C++, and I have seen plenty of bad C/C++ code.

Once again, the blame is not being properly placed. It’s not the language that is at fault, but the person using or choosing to use the language for a specific purpose. Blame the Bosses for choosing the wrong tool if this is the case or for not knowing when to let somebody who has more knowledge of software development make the choice.

I’ve done software development professionally and I am well aware of the unreasonable deadlines managers or others can place on programmers to crank out code. It’s no wonder why there is so much bad code out there. Sometimes those quick utilities one writes can end up becoming organization wide or department wide applications and a person is often not allowed the proper time to do it right.

8-Dale