Making a picture browser in VB 6

Getting Started

Our application will be titled ‘Picture Browser’. At present, keeping our application to a single form will be a better approach, as it will keep things simple. If you are following some books or web-sites etc, you must have seen the term MDI and SDI, they respectively mean, multiple document interface and single document interface. In an MDI application, several forms can be loaded, but this application of ours, will have a single interface, a requirement of the scope.  

The controls we will use are going to be Picture Box, Drive List Box, Directory List Box and File List Box, that’s it! Simple isn’t it? And its not problematical to figure out what these controls are for. The picture box will display the picture and the rest will give you access to the location of the file you want to appear in the picture box.  

Now, consider a hypothetical path: [c:\] [images\] [rose.jpg] these three parts (the square brackets) are important thing to understand, they represent the complete path to the image. The first is the drive letter; we will use the drive list control to get this part. Second is the name of the directory, in this example its ‘images’ but keep in mind that it could have sub-directories too, say for example, “images\flowers\roses” can be the directory structure where you store the pictures of roses in your computer, for this part, the drive list control will be used. The last part is the file name and that, as you must have guessed, will be done by using the file list control.  

So, having sufficient knowledge about the controls, (the building blocks of your application) we can head towards placing them at right positions on the form.First of all, open the Visual Basic 6.0, select the ‘Standard Exe” as the new project type.  

You might also like...

Comments

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“A computer lets you make more mistakes faster than any other invention in human history, with the possible exceptions of handguns and tequila” - Mitch Ratcliffe