You just got that shiny new digital camera, and then you downloaded a bunch of digital pictures to your computer. Next you want to create a simple Hypertext Markup Language (HTML) file so that you can burn the picture and HTML files to a CD that you can send to all your friends and family. How do you do this without having to manually code the HTML file? The following instructions will show you how.
Creating an HTML File List with VB - Setting Up Your Program (Page 2 of 5 )
Create a directory for your project files. I created one at /My Documents/VisualBasic/HTMLCatalog
If you haven’t already done so, start Visual Basic.
When you open the Visual Basic Integrated Development Environment (IDE) a form should appear. It usually defaults to Form1. Save it in your project folder as frmMain.frm by clicking (on the menu bar) File, Save Form1 As, navigate to the drive and folder, and enter frmMain, and click the Save button.
Save your project as HTMLCatalog.vbp by clicking File, Save Project As, and type HTMLCatalog, and click the Save button.
Click once on the form. If the properties are showing, you should see something like this:
In the name properties block, change it to frmMain.
Change the following properties:
Caption to HTML Catalog
Height to 2955
Width to 6255
StartupPosition to 1-Center (so that the form appears at the center of the screen on startup)
The form should look something like this:
On the tool bar (it defaults to the left side of the IDE), click the label tool (It has a capital A on it) and drag it to the form to create a label. In the properties, change the following:
Name to lblLocation
Caption to Location
Next to the label tool is the text box tool. Click it and drag it to the form to create a text box.
Change the properties to:
Name to txtLocation
Width to 3495
Height to 285
Text to the drive and path to the directory you will save your picture files, and the one the application will search and catalog. For this example I entered D:PICTURES
Below the text tool is the Command button. Click this tool and drag it to the form to create a command button. Change the properties to: