dcsimg
December 3, 2016
Hot Topics:

Customising Your Setup - Part 1

  • November 19, 2002
  • By Dax Pandhi
  • Send Email »
  • More Articles »

Now, I'm going to show you how to add your own forms to a setup program a Welcome form, a License Agreement form, plus a possible 'Read Me' form.

First off, I'm going to add a Welcome form:

  • Add a form and name it "frmWelcomeX"

There is already a form called FrmWelcome, - we'll rename it to FrmRegister later - but for now, we'll add this new form, FrmWelcomeX as a welcome form.

  • Add two command buttons "cmdContinue" & "cmdCancel"
  • Make their captions to "&Continue" and "E&xit" respectively. Make sure they're both at the bottom of the form
  • Add a label with some welcome text like "Welcome to my setup" etc. - also, you may want to add a label with a copyright warning.
  • Add the following code to the form:
Private Sub cmdContinue_Click()Unload MeFrmLicense.Show vbModal, Me' The Next FormEnd SubPrivate Sub cmdCancel_Click()ExitSetup Me, gintRET_EXITEnd SubPrivate Sub Form_Load()CenterForm MeEnd Sub

Adding a License Agreement

Next, we're going to add a form containing the License Agreement, a very important part of your software! Just a personal note - keep your License agreement as legally tight as possible, it's very important.

  • Add a form to the project and name it "frmLicense". Make sure it is 5300 x 8800 (Height x Width)
  • Add two command buttons "cmdContinue" & "cmdCancel". Make their captions "&Continue" and "E&xit Setup" respectively. Make sure they're both at the bottom of the form
  • Add a text box named "txtLicense" and make sure the Locked and MultiLine properties are set to True
  • Set the ScrollBars property to Vertical. Cut and paste your License agreement into the Text property

NOTE: You can't load a text file into the text box using the open xxx for input as

because the Setup1.exe is copied to the Windows directory and the license.txt file will be compressed in the Temp directory. So, the above method is best.

  • Add the following code in frmLicense:
Private Sub cmdContinue_Click()Unload MeFrmReadme.Show vbModal, me ' Next formEnd SubPrivate Sub cmdCancel_Click()ExitSetup Me, gintRET_EXITEnd SubPrivate Sub Form_Load()CenterForm MeEnd Sub

Read-Me Form

In the same way, create frmReadme. It can be created JUST like frmLicense. The code is the same, just replace the cmdContinue_Click() code to:

Unload MeFrmRegister.Show vbModal




Page 4 of 9



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Sitemap | Contact Us

Thanks for your registration, follow us on our social networks to keep up-to-date
Rocket Fuel