-
VB 3 question
I code for my personal use and not a business use. VB 3 has met my needs for a number of years. Now due to a lightning strike that took out my computer, O/S-XP Professional, and replacing it with a new 64 bit running Windows 7 I am forced to upgrade. I have VB 6 and will eventually get it running on another computer running XP. VB 3 had a "Grid" that would display a flat file. This worked great for me. Now what can I use in VB 6 to display a flat file? I do not want to go through converting my programs into using database files and using a dbgrid.
I sure hope the people here can help. Thanks.
-
Re: VB 3 question
I don't have any experience in VB3 so I don't know what that grid control can do. But you have MSFlexGrid and ListView controls (multi columned) that can display data like that. Code to load a file to a grid like that is pretty simple. Could you post an example of data in the file you want to load?
-
Re: VB 3 question
I started with VB3 and can tell you that the Grid control you were using stopped being a part of VB with VB5.
The closest you are going to find is what baja_vu mentioned and the coding for that is difference than the old Grid control you are using to.
-
Re: VB 3 question
This MSFlexGrid is an unbound grid control that you can use to convert your VB3 program.
Go to the link below and pay attention to the 3rd post in the thread. It will give you the details you'll need to convert your VB3 flat file project.
http://www.tek-tips.com/viewthread.cfm?qid=171450
Good Luck!
Tom
-
Re: VB 3 question
>stopped being a part of VB with VB5
but continued to be supplied in VB6 on the 2nd CD in \COMMON\TOOLS\VB\CONTROLS. See the ReadMe.txt file, and the one you're looking for Grid32.ocx. I seem to remember that Grid32.ocx took over from Grid.ocx (or was it .vbx) for compatibility in vb4 which was the one which could optionally produce 16 and/or 32 bit exes. Grid32.ocx continues to work just fine on recent OSs but is officially 'unsupported' by MS.
Code to accomodate MsFlxGrd.ocx in place of Grid32.ocx will typically require a few tweaks but is very similar; MsFlxGrd.ocx offers some attractive 'new' features and is officially 'supported' by MS under the latest OSs and is therefore recommended.
-
Re: VB 3 question
Grid was replaced by DbGrid which is DAO-limited. DbGrid was replaced by DataGrid which is ADO-enabled.
MSFlexGrid is an old control superceded by MSHFlexGrid which is a superset. MSFlexGrid is included primarily for upgrading VB5 programs to VB6. I'd recommend MSHFlexGrid instead of the older control. Both of these are "display only" controls that don't accept user edits, inserts, deletes, etc.
All of these support data binding, though DbGrid and DataGrid pretty much require it.
If you have a simple CSV or Tab-delimited format stream file the data-bound grids can readily display them using DAO or even more flexibly using ADO. If you provide schema information even fixed-field stream files can be read, created, or appended to as well.
Don't fear data binding. It is one of the important features of VB and it can save you a lot of code.
-
Re: VB 3 question
Data binding is evil and very much unreliable - stay away from it. It may save you few moments on the coding side but it won't give you much in exchange and no control what so ever.
MSFlexgrid is wonderful control that offers lots of funtionality for most common tasks.
MSHFlexGrid is basically the same with few extras such as data binding, etc...
Based on what you said in your original post VB6 has plenty of functionality to handle your data files.
If you need some samples you will need to present a bit more details and perhaps post some sample file as well.
Also, ,for basic I/O there is a thread in FAQ forum.
-
Re: VB 3 question
Wait a minute. The old Grid control that I used for years with VB3 also works with VB6. That control is available from my VB6 components list. :ehh:
The only quirk I have noticed is that PrintForm will not send it to the printer. However, screen capture methods are available that work to do the same thing.