dean1484
dean1484 GRM+ Memberand UltraDork
11/25/12 10:13 p.m.

I have a project that I have been mucking with for a while and I have been trying to teach my self VB6. Between google and YouTube I have learned a lot as well as I have read through the visual Basic for Dummies. I also have the Visual Basic 6 "Black Book".

The end game is to write a program that can take data from a device attached to my computer save it to a file and then graph the data from the file.

The second part of the program is to send configuration commands to the device that attaches to my computer that will provide the setup for the device.

Both would like simple things to do but I have learned that it is not.

I am still a long way from being a program and I need help. Anyone here have a lead as to a good way to learn this? Anyone local here want to tutor me? Any help, references to help, etc would be greatly appreciated.

JThw8
JThw8 PowerDork
11/26/12 7:46 a.m.

Not sure which book you mean when you say "black book"

Maaaany years ago when I was trying to learn VB I was getting nowhere with the standard reference material but I stumbled on a book called "The Black Art of Visual Basic game programming" Although it was oriented toward writing games with VB it had many tips and tricks that I hadn't found in other references and was a good source.

Of course this was back in...98 or so, much has probably changed since that time.

dean1484
dean1484 GRM+ Memberand UltraDork
11/26/12 8:04 a.m.

This is the Black Book I have

http://www.amazon.com/Visual-Basic-Black-Book-Youll/dp/1932111085/ref=sr_1_1?ie=UTF8&qid=1353938597&sr=8-1&keywords=visual+basic+black+book

scardeal
scardeal Dork
11/26/12 10:33 a.m.

All my VB6 stuff is database related. Not sure how much of it applies.

szeis4cookie
szeis4cookie Reader
11/26/12 11:59 a.m.

You need a couple of items of documentation which should help you. First, the device that you are wanting to program should have an API of some variety, that has the commands that allow a program to "talk" to it. Most documentation of this variety I've encountered has bits of sample code that would help you along.

For the graphing piece - the easiest way to do it is to use Excel - you'll want to go to the MSDN website and look at the documentation for creating and manipulating a Microsoft Excel object from your program.

I've done similar things in VBA, but not VB6...

dean1484
dean1484 GRM+ Memberand UltraDork
11/26/12 12:10 p.m.
szeis4cookie wrote: You need a couple of items of documentation which should help you. First, the device that you are wanting to program should have an API of some variety, that has the commands that allow a program to "talk" to it. Most documentation of this variety I've encountered has bits of sample code that would help you along.

The piece of hardware is of our own design. The commands are simple. Currently I have been controlling it via terminal services. IE i Have that part covered.

szeis4cookie wrote: For the graphing piece - the easiest way to do it is to use Excel - you'll want to go to the MSDN website and look at the documentation for creating and manipulating a Microsoft Excel object from your program. I've done similar things in VBA, but not VB6...

Hummmm I have actually been doing the graping using Excel. I am going to have to read up on this as I am not sure how to integrate the Excel graphing in to my VB6 program.

GameboyRMH
GameboyRMH GRM+ Memberand PowerDork
11/26/12 1:08 p.m.

I did it way back when, if you're not new to programming in general it's no harder than learning any new language. Do people still use VB6? If you don't have to use VB6 I'd go with something else, maybe Python or just C.

scardeal
scardeal Dork
11/26/12 1:15 p.m.

Is this something internal, or is it being shipped to people?

Makes a difference....

dean1484
dean1484 GRM+ Memberand UltraDork
11/26/12 1:38 p.m.

For the moment is is proof of concept / demonstration mode. But yes it could be shipped, at least initially. I want the program to run independent if possible. I don't want end uses to have to have Excel on there computers.

However I am also aware that this initial iteration will probably be completely scrapped eventually.

dean1484
dean1484 GRM+ Memberand UltraDork
11/26/12 1:40 p.m.
Gameboy RMH wrote: I did it way back when, if you're not new to programming in general it's no harder than learning any new language. Do people still use VB6? If you don't have to use VB6 I'd go with something else, maybe Python or just C.

New is relative. I learned some BASIC about 25-30 years ago (High School). I have not touched it for probably 20-25 years. For all intensive purposes I am new to this.

BradLTL
BradLTL GRM+ Memberand Dork
11/26/12 1:58 p.m.
GameboyRMH wrote: I did it way back when, if you're not new to programming in general it's no harder than learning any new language. Do people still use VB6? If you don't have to use VB6 I'd go with something else, maybe Python or just C.

+1

I learned VB6... a long time ago... Python is a good starting place. Try this: http://www.udacity.com/overview/Course/cs101/CourseRev/apr2012

BradLTL
BradLTL GRM+ Memberand Dork
11/26/12 2:00 p.m.
dean1484 wrote: For the moment is is proof of concept / demonstration mode. But yes it could be shipped, at least initially. I want the program to run independent if possible. I don't want end uses to have to have Excel on there computers. However I am also aware that this initial iteration will probably be completely scrapped eventually.

Are you using Excel? That makes a difference as well. Application API vs File I/O (i.e. text or dat file).

dean1484
dean1484 GRM+ Memberand UltraDork
11/26/12 4:06 p.m.

The files I get off the device are comma separated text files (voltage versus time) I pull these down using terminal services. I then cut and past the data from the text file in to a spreadsheet where the voltage is converted to actual numerical values that are meaningful (simple linear equation) I had been just cutting and pasting the data from the text file to an excel spread sheet I had already made up that had graphs already in the sheets.

I would like my VB program to pull the data from the device and save it to a text file in the same comma separated format. I would then as a separate part of the program you would graph the data by selecting the file and and getting the data from the file. Another "issue" is that I have multiple memory banks in the device and I can pull all of them at once or one at a time and save them in to separate files. For now I will probably want to simplify the downloading and graphing by pulling each bank of memory down individually and then saving each as a separate file. This way all the files have the same format and I will just graph them separately and compare the graphs on the screen as separate graphs / images / charts.

I have been told that you can do this using the MSchart function but dam is it confusing to work with. Like I don't understand it confusing as I am just a beginner with this stuff.

For those that care Yes VB6 is alive and well for now and still used allot in the programming world. This may change with windows 8 but for now I am not using Windows 8. I will cross that problem when i get there.

Yes this is an automotive related project if anyone is interested.

jeffmx5
jeffmx5 Reader
11/27/12 11:22 a.m.

I'm personally leery of VB anything. VB6 is end-of-life and no longer supported by MS. If possible, I'd look at Java or C#. Both are pretty easy to pick up. If you are stuck on using VB, why not VB.NET?

For charting, if you go with a .NET language you can use ZedGraph.

dean1484
dean1484 GRM+ Memberand UltraDork
11/27/12 11:43 a.m.

I am not married to VB6 but it is where I started quite some time back. I really like the simplicity of it. This is only a prototype proof of concept and I fully expect that it will be tossed in the trash in the not to distant future. I have all the Visual stuff already written. I can click from form to form etc. I just need to deal with the data and that would be enough for me for now. I could them move on and hopefully have some one else do the programing for the next iteration.

You'll need to log in to post.

Our Preferred Partners
Ia2FiKFWyrclqa61hGCj0HdL481sOOBanZrvB4JRPhNiewIupkTKvtAsm8RWu80x