How to develop a commercial e-Statement application in vb6 step by step – Part 2- Setting up your development environment


Building a Commercial e-Statement Application in VB 6 – Setting up your development environment

During our last article we looked at the E-Statement Basics and what you will need to have before you are able to develop this application.  Today we are going to setup our development environment before we begin programming our application. After this article the up coming articles will be purely coding so make sure you set up your development environment correctly.

In Summary, we are going to do the following in this article

  1. Installing Microsoft Visual Studio 6.0  on Windows 32-bit versions and Windows 64-bit versions
  2. Installing Microsoft SQL Server 2008 R2 Express Edition
  3. Installing Notepad ++
  4. Testing Visual Studio with a “hello world” program

E-Statement Development Tools

So lets start setting up our development environment:

Installing Microsoft Visual Studio 6.0

I will assume you have the SETUP files for installing Microsoft Visual Studio 6.0.

Windows XP and Vista

For 32-bit versions of Windows Vista and XP accept Visual Studio without trouble. If you have a Windows Vista computer or one running XP, simply install Visual Studio from the CDs or other media using the automatic Installation Wizard. During installation, Visual Studio prompts you for the languages you want to use; make sure you select Visual Basic 6.

Windows 7 and 8 64-bit version

Again here for 32-bit versions of Windows 7 and 8, installing Visual Studio 6.0 is somewhat more straightforward. The problem comes when installing Visual Studio 6.0 on a 64-bit versions of Windows 7 and 8. But don’t worry I was able to install on my machine running Windows 8.1 Pro.

  • Create a zero-byte file in C:\Windows\System32 and C:\Windows\SysWOW64  named MSJAVA.DLL

To create the file open Notepad and do not type anything, go to File > Save as MSJAVA.DLL. Make sure to choose All Files on the Save as type ,as shown  below. Save it on your desktop before copying it to C:\Windows\System32 and C:\Windows\SysWOW64

Installing VB 6 in windows 7 and 8 64 bit

Installing VB 6 in windows 7 and 8 64 bit

The reason for this is that the setup will look for this file and if it doesn’t find it, it will force for installation of very old version of Java  and will force reboot too. By creating a zero-byte file, the Java installation is bypassed, and no reboot is required.

  •  Insert your Visual Studio 6 CD (or extract the given file to a folder ), exit from Autorun if using a CD.Browse to the root folder of CD (or the extracted folder) .Right Click “SETUP.EXE” -> Properties -> Compatibility Tab. Now Check “Run this program in compatibility mode” and Select Windows XP( Service Pack 3) .Also Check “Run this program as Administrator” and Click OK

  • Open  SETUP.EXE UAC will prompt for confirmation. Select Yes .Program Compatibility Assistant warnings might appear. Select Run Program There Click Next -> Click “I accept agreement”, then Next -> Enter name and company information, click Next Now Select “Custom Setup” (IMPORTANT). Click Next ,Click Continue, then OK
  • Let the Setup  run. It might also go to “Not responding” State and Windows might Prompt to close the Process. DO NOT close the process.(IMPORTANT) Select “Wait for the program to respond”, you might have to wait for 30-45 minutes on “Not Responding” State
  • Now finally the options list appears Click on “Select All”. All options should be checked. Click Continue, setup will continue.Here the Setup might again Hang on “Updating System”. Wait, DO NOT close the process. Again the wait time might be quite long, BE PATIENT

Finally, a successful completion dialog will appear, at which click OK. At this point, Visual Basic 6 is installed. Some people might also get some error, but Visual Basic 6 will be installed anyways.

Installing Microsoft SQL Server 2008 R2 Express Edition

Now that we have installed our front-end, we need to install Microsoft SQL Server 2008 R2 Express Edition as our application`s back-end.  You will need to download Microsoft SQL 2008 R2 Express Edition from Microsoft which is compatible with your Windows.

  • Determine if the operating system is 32 or 64 bit. You can determine this by going into the Control Panel, going into System, and checking what it says under System type.
  • Run the correct installation:
    SQLEXPRWT_x64_ENU.exe – 64 Bit Operating System
    SQLEXPRWT_x86_ENU.exe – 32 Bit Operating System
  • If any of the prerequisites are missing, you need to install them before you continue. This includes .NET Framework 3.5 Service Pack 1. When you run SQL 2008 installation, it will specify if any per-requisite programs are missing and provide download links for these programs.
  • The following option will be desplayed Server Installation Center

  • Click on “New installation or add features to an existing installation”. Accept the License Terms. Click Next.
    The installation will check that it has all of the programs that it needs to install. It will notify you if it is missing any files and stop you at this point.
  • The following options should be selected: Server Installation Center-Options

  • Select the Default Instance, unless you specifically want a different instance name (creating an instance allows you to run more than one SQL Server on one machine)

  • On the drop down for the SQL Server Database Engine, select “Network Service” for the Account Name to run SQL on

  • Select Mixed Mode and enter the password of your choice. Remember the password (IMPORTANT). Also Click on Add Current User.

  • Complete the installation by clicking on Next


Installing Notepad ++

Notepad ++ is my favorite text editor because it is lite and comes with a great syntax highlighting . We are going to use this when creating our HTML email body before we transfer it to V6 code editor.

Congratulations if you have successfully set up your development environment. In case you have any problems you can contact me or comment and I will try to reply ASAP.

Testing your Visual Studio 6.0

Open your Microsoft Visual Basic 6 and create a New Project of Standard EXE type and Click on Open

Open Visual Basic

The setup will automatically add Form 1 to your Project1. Add one Command Button to your form.

Double click on your button and add the following code:

Private Sub Command1_Click()
'Author: www.smarttechdiary
'Module: Testing VB6 Installation
MsgBox "Hello World", vbInformation, "VB 6.0 Testing"
End Sub

Run your program and click “Command 1″ button. If you see the following window, then you have correctly
installed Microsoft Visual Studio 6.0

I am going to end here today until  next week. But I would like to hear from you, so please leave your comments/suggestion below. Kindly Like and Share the posts with your friends using the buttons below.

You can also register to our Mailing List so that you don’t miss our next article.

How to develop a commercial e-Statement application in vb6 step by step – Part 1- E-Statement Basics

 Building a Commercial e-Statement Application in VB 6/Sending Emails in VB 6

Most companies are trying to save the cost of printing by embracing the technology and going green. In this series of posts I am going to show you step by step on how I developed a commercial e-Statement application for a local bank in Kenya.
Each new post will build on the previous post until we have the final product. So you will need to keep track of the posts.


E-Statement Basics

What is an e-statement?

An e-statement is just an electronic means of receiving your regular monthly (or quarterly) account statement(s) from your bank , SACCO etc. Instead of receiving a paper statement by mail, you’ll receive an e-mail notifying you that your statement is available for viewing online or an e-mail with the e-statement attached. The statement  will look exactly like the paper version.

What are the benefits of receiving an e-statement rather than a paper statement?

There are several benefits to receiving an e-statement rather than a paper statement. E-statements:

Save time – E-statements are available the first business day of the month, up to a week sooner than mailed statements. Open and view your statements when it’s convenient for you.

Fight clutter – A paper statement is just one more thing for your files (or that pile on your desk), while an e-statement can be quickly and easily stored on your PC or a disk. If you need a statement copy for any reason, just print one from your disk.

Provide security – Identity theft still tends to be a low-tech crime, often the result of bills, credit card solicitations or financial statements swiped from a garbage can or mailbox. E-statements mean that less of your financial information is vulnerable to identity thieves, since you access them through a secure Internet connection, and only after you enter your unique  access code to open the PDF.

Save money – Printing and mailing statements costs a significant amount of money. When you select to receive an e-statement, the credit union saves. Since credit unions are cooperatives, those savings come back to you as lower loan rates, higher deposit rates and new products and services.

Sounds like something you need to achieve ? Subscribe to our mailing list to get the latest updates on this series.

Assumptions made

For you to be able to make sense of this course, you will need to have some basic programming skills and database skills.

  1. Visual Basic Programming skills
  2. HTML and CSS
  3. Basics Microsoft SQL Server skills

So what will the end product be able to do?

  • Login to the e-Statement application
  • Setup your SMTP server and other Application Settings
  • Send thousands of emails to different users with their attached e-Statement automatically by picking customer`s email addresses from the database and the PDF statement from a folder
  • Have advertisements on each email sent to a user in the HTML body
  • Have the HTML email body customized for each user with the “Dear so and so”
  • I might also show you how to programmatically encrypt your PDFs e-Statement before you send them to your customers

I am going to share all the code with you as we go on building this application together. The code snippets will look like below:

[code lang=”vb”]
Dim Fso As FileSystemObject
Dim num_files, j As Long
Dim files() As String
Dim FilterAccno As String
Public Con As ADODB.Connection
Dim Rs As New ADODB.Recordset
Dim processedItems As Integer
Dim sentItems As Integer
Dim unSentItems As Integer

I would like to hear from you, so please leave your comments/suggestion below.
Kindly Like and Share the posts with your friends using the buttons below.