home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form4
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "Installation options..."
- ClientHeight = 4200
- ClientLeft = 1320
- ClientTop = 2112
- ClientWidth = 6372
- ControlBox = 0 'False
- Height = 4524
- Left = 1272
- LinkMode = 1 'Source
- LinkTopic = "Form4"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 4200
- ScaleWidth = 6372
- Top = 1836
- Width = 6468
- Begin CommandButton Commande2
- Caption = "&Abort"
- Height = 375
- Left = 5040
- TabIndex = 1
- Top = 720
- Width = 1215
- End
- Begin CommandButton Commande1
- Caption = "OK"
- Height = 375
- Left = 5040
- TabIndex = 0
- Top = 240
- Width = 1215
- End
- Begin Frame Cadre1
- BackColor = &H00C0C0C0&
- Caption = "Install... "
- Height = 3375
- Left = 120
- TabIndex = 6
- Top = 120
- Width = 4815
- Begin CheckBox Coche8
- BackColor = &H00C0C0C0&
- Caption = "Coche8"
- Height = 255
- Left = 120
- TabIndex = 14
- Top = 2880
- Visible = 0 'False
- Width = 3375
- End
- Begin CheckBox Coche7
- BackColor = &H00C0C0C0&
- Caption = "Coche7"
- Height = 255
- Left = 120
- TabIndex = 13
- Top = 2520
- Visible = 0 'False
- Width = 3375
- End
- Begin CheckBox Coche6
- BackColor = &H00C0C0C0&
- Caption = "Coche6"
- Height = 255
- Left = 120
- TabIndex = 12
- Top = 2160
- Visible = 0 'False
- Width = 3375
- End
- Begin CheckBox Coche5
- BackColor = &H00C0C0C0&
- Caption = "Coche5"
- Height = 255
- Left = 120
- TabIndex = 11
- Top = 1800
- Visible = 0 'False
- Width = 3375
- End
- Begin CheckBox Coche4
- BackColor = &H00C0C0C0&
- Caption = "Coche4"
- Height = 255
- Left = 120
- TabIndex = 10
- Top = 1440
- Visible = 0 'False
- Width = 3375
- End
- Begin CheckBox Coche3
- BackColor = &H00C0C0C0&
- Caption = "Coche3"
- Height = 255
- Left = 120
- TabIndex = 9
- Top = 1080
- Visible = 0 'False
- Width = 3375
- End
- Begin CheckBox Coche2
- BackColor = &H00C0C0C0&
- Caption = "Coche2"
- Height = 255
- Left = 120
- TabIndex = 8
- Top = 720
- Visible = 0 'False
- Width = 3375
- End
- Begin CheckBox Coche1
- BackColor = &H00C0C0C0&
- Caption = "Coche1"
- Height = 255
- Left = 120
- TabIndex = 7
- Top = 360
- Visible = 0 'False
- Width = 3375
- End
- Begin Label Etiquette10
- Alignment = 1 'Right Justify
- BackColor = &H00C0C0C0&
- Height = 255
- Left = 3600
- TabIndex = 22
- Top = 2880
- Visible = 0 'False
- Width = 1095
- End
- Begin Label Etiquette9
- Alignment = 1 'Right Justify
- BackColor = &H00C0C0C0&
- Height = 255
- Left = 3600
- TabIndex = 21
- Top = 2520
- Visible = 0 'False
- Width = 1095
- End
- Begin Label Etiquette8
- Alignment = 1 'Right Justify
- BackColor = &H00C0C0C0&
- Height = 255
- Left = 3600
- TabIndex = 20
- Top = 2160
- Visible = 0 'False
- Width = 1095
- End
- Begin Label Etiquette7
- Alignment = 1 'Right Justify
- BackColor = &H00C0C0C0&
- Height = 255
- Left = 3600
- TabIndex = 19
- Top = 1800
- Visible = 0 'False
- Width = 1095
- End
- Begin Label Etiquette6
- Alignment = 1 'Right Justify
- BackColor = &H00C0C0C0&
- Height = 255
- Left = 3600
- TabIndex = 18
- Top = 1440
- Visible = 0 'False
- Width = 1095
- End
- Begin Label Etiquette5
- Alignment = 1 'Right Justify
- BackColor = &H00C0C0C0&
- Height = 255
- Left = 3600
- TabIndex = 17
- Top = 1080
- Visible = 0 'False
- Width = 1095
- End
- Begin Label Etiquette4
- Alignment = 1 'Right Justify
- BackColor = &H00C0C0C0&
- Height = 255
- Left = 3600
- TabIndex = 16
- Top = 720
- Visible = 0 'False
- Width = 1095
- End
- Begin Label Etiquette3
- Alignment = 1 'Right Justify
- BackColor = &H00C0C0C0&
- Height = 255
- Left = 3600
- TabIndex = 15
- Top = 360
- Visible = 0 'False
- Width = 1095
- End
- End
- Begin Label FreeLabel
- Alignment = 1 'Right Justify
- BackColor = &H00C0C0C0&
- Caption = "K"
- Height = 255
- Left = 3360
- TabIndex = 5
- Top = 3840
- Width = 1455
- End
- Begin Label Etiquette2
- BackColor = &H00C0C0C0&
- Caption = "Free disk space (Kb.):"
- Height = 255
- Left = 240
- TabIndex = 3
- Top = 3840
- Width = 3255
- End
- Begin Label SelLabel
- Alignment = 1 'Right Justify
- BackColor = &H00C0C0C0&
- Caption = "K"
- Height = 255
- Left = 3240
- TabIndex = 4
- Top = 3600
- Width = 1575
- End
- Begin Label Etiquette1
- BackColor = &H00C0C0C0&
- Caption = "Required disk space (Kb.):"
- Height = 255
- Left = 240
- TabIndex = 2
- Top = 3600
- Width = 3255
- End
- Sub Coche1_Click ()
- '---------------------------------------------------
- ' Add or remove a group
- ' and change the selection size
- '---------------------------------------------------
- a% = 1
- If (Coche1.Value = 0) Then
- UserConfigSize& = UserConfigSize& - Section(a%).lSize&
- Section(a%).bSelected% = 0
- UserConfigSize& = UserConfigSize& + Section(a%).lSize&
- Section(a%).bSelected% = 1
- End If
- If (iLanguage% = LANGUAGE_FRENCH) Then
- SelLabel.Caption = Str$(UserConfigSize&) + " Ko."
- If (Section(a%).bSelected% = 1) Then
- Etiquette3.Caption = Str$(UserConfigSize&) + " Ko."
- End If
- SelLabel.Caption = Str$(UserConfigSize&) + " Kb."
- If (Section(a%).bSelected% = 1) Then
- Etiquette3.Caption = Str$(UserConfigSize&) + " Kb."
- End If
- End If
- If (Section(a%).bSelected% = 0) Then
- Etiquette3.Caption = ""
- End If
- End Sub
- Sub Coche2_Click ()
- a% = 2
- If (Coche2.Value = 0) Then
- UserConfigSize& = UserConfigSize& - Section(a%).lSize&
- Section(a%).bSelected% = 0
- UserConfigSize& = UserConfigSize& + Section(a%).lSize&
- Section(a%).bSelected% = 1
- End If
- If (iLanguage% = LANGUAGE_FRENCH) Then
- SelLabel.Caption = Str$(UserConfigSize&) + " Ko."
- If (Section(a%).bSelected% = 1) Then
- Etiquette4.Caption = Str$(UserConfigSize&) + " Ko."
- End If
- SelLabel.Caption = Str$(UserConfigSize&) + " Kb."
- If (Section(a%).bSelected% = 1) Then
- Etiquette4.Caption = Str$(UserConfigSize&) + " Kb."
- End If
- End If
- If (Section(a%).bSelected% = 0) Then
- Etiquette4.Caption = ""
- End If
- End Sub
- Sub Coche3_Click ()
- a% = 3
- If (Coche3.Value = 0) Then
- UserConfigSize& = UserConfigSize& - Section(a%).lSize&
- Section(a%).bSelected% = 0
- UserConfigSize& = UserConfigSize& + Section(a%).lSize&
- Section(a%).bSelected% = 1
- End If
- If (iLanguage% = LANGUAGE_FRENCH) Then
- SelLabel.Caption = Str$(UserConfigSize&) + " Ko."
- If (Section(a%).bSelected% = 1) Then
- Etiquette5.Caption = Str$(UserConfigSize&) + " Ko."
- End If
- SelLabel.Caption = Str$(UserConfigSize&) + " Kb."
- If (Section(a%).bSelected% = 1) Then
- Etiquette5.Caption = Str$(UserConfigSize&) + " Kb."
- End If
- End If
- If (Section(a%).bSelected% = 0) Then
- Etiquette5.Caption = ""
- End If
- End Sub
- Sub Coche4_Click ()
- a% = 4
- If (Coche4.Value = 0) Then
- UserConfigSize& = UserConfigSize& - Section(a%).lSize&
- Section(a%).bSelected% = 0
- UserConfigSize& = UserConfigSize& + Section(a%).lSize&
- Section(a%).bSelected% = 1
- End If
- If (iLanguage% = LANGUAGE_FRENCH) Then
- SelLabel.Caption = Str$(UserConfigSize&) + " Ko."
- If (Section(a%).bSelected% = 1) Then
- Etiquette6.Caption = Str$(UserConfigSize&) + " Ko."
- End If
- SelLabel.Caption = Str$(UserConfigSize&) + " Kb."
- If (Section(a%).bSelected% = 1) Then
- Etiquette6.Caption = Str$(UserConfigSize&) + " Kb."
- End If
- End If
- If (Section(a%).bSelected% = 0) Then
- Etiquette6.Caption = ""
- End If
- End Sub
- Sub Coche5_Click ()
- a% = 5
- If (Coche5.Value = 0) Then
- UserConfigSize& = UserConfigSize& - Section(a%).lSize&
- Section(a%).bSelected% = 0
- UserConfigSize& = UserConfigSize& + Section(a%).lSize&
- Section(a%).bSelected% = 1
- End If
- If (iLanguage% = LANGUAGE_FRENCH) Then
- SelLabel.Caption = Str$(UserConfigSize&) + " Ko."
- If (Section(a%).bSelected% = 1) Then
- Etiquette7.Caption = Str$(UserConfigSize&) + " Ko."
- End If
- SelLabel.Caption = Str$(UserConfigSize&) + " Kb."
- If (Section(a%).bSelected% = 1) Then
- Etiquette7.Caption = Str$(UserConfigSize&) + " Kb."
- End If
- End If
- If (Section(a%).bSelected% = 0) Then
- Etiquette7.Caption = ""
- End If
- End Sub
- Sub Coche6_Click ()
- a% = 6
- If (Coche6.Value = 0) Then
- UserConfigSize& = UserConfigSize& - Section(a%).lSize&
- Section(a%).bSelected% = 0
- UserConfigSize& = UserConfigSize& + Section(a%).lSize&
- Section(a%).bSelected% = 1
- End If
- If (iLanguage% = LANGUAGE_FRENCH) Then
- SelLabel.Caption = Str$(UserConfigSize&) + " Ko."
- If (Section(a%).bSelected% = 1) Then
- Etiquette8.Caption = Str$(UserConfigSize&) + " Ko."
- End If
- SelLabel.Caption = Str$(UserConfigSize&) + " Kb."
- If (Section(a%).bSelected% = 1) Then
- Etiquette8.Caption = Str$(UserConfigSize&) + " Kb."
- End If
- End If
- If (Section(a%).bSelected% = 0) Then
- Etiquette8.Caption = ""
- End If
- End Sub
- Sub Coche7_Click ()
- a% = 7
- If (Coche7.Value = 0) Then
- UserConfigSize& = UserConfigSize& - Section(a%).lSize&
- Section(a%).bSelected% = 0
- UserConfigSize& = UserConfigSize& + Section(a%).lSize&
- Section(a%).bSelected% = 1
- End If
- If (iLanguage% = LANGUAGE_FRENCH) Then
- SelLabel.Caption = Str$(UserConfigSize&) + " Ko."
- If (Section(a%).bSelected% = 1) Then
- Etiquette9.Caption = Str$(UserConfigSize&) + " Ko."
- End If
- SelLabel.Caption = Str$(UserConfigSize&) + " Kb."
- If (Section(a%).bSelected% = 1) Then
- Etiquette9.Caption = Str$(UserConfigSize&) + " Kb."
- End If
- End If
- If (Section(a%).bSelected% = 0) Then
- Etiquette9.Caption = ""
- End If
- End Sub
- Sub Coche8_Click ()
- a% = 8
- If (Coche8.Value = 0) Then
- UserConfigSize& = UserConfigSize& - Section(a%).lSize&
- Section(a%).bSelected% = 0
- UserConfigSize& = UserConfigSize& + Section(a%).lSize&
- Section(a%).bSelected% = 1
- End If
- If (iLanguage% = LANGUAGE_FRENCH) Then
- SelLabel.Caption = Str$(UserConfigSize&) + " Ko."
- If (Section(a%).bSelected% = 1) Then
- Etiquette10.Caption = Str$(UserConfigSize&) + " Ko."
- End If
- SelLabel.Caption = Str$(UserConfigSize&) + " Kb."
- If (Section(a%).bSelected% = 1) Then
- Etiquette10.Caption = Str$(UserConfigSize&) + " Kb."
- End If
- End If
- If (Section(a%).bSelected% = 0) Then
- Etiquette10.Caption = ""
- End If
- End Sub
- Sub Commande1_Click ()
- If (UserConfigSize& > AskForDriveSpace(GetDriveNumber(UserPath$))) Then
- Beep
- If (iLanguage% = LANGUAGE_FRENCH) Then
- MsgBox "Il n' a pas assez d' espace disponible pour cette s
- lection!"
- Else
- MsgBox "Not enough free disk space!"
- End If
- Exit Sub
- End If
- '---------------------------------------------------
- ' We actually add the groups to install depending
- ' on the selected groups
- '---------------------------------------------------
- For a% = 1 To 8
- If (Section(a%).bSelected% = 1) Then
- TempPath$ = UserPath$
- If (Section(a%).Directory <> "") Then
- TempPath$ = TempPath$ + Section(a%).Directory$
- End If
- b% = AddSectionToCopyList(Section(a%).Name$, TempPath$)
- End If
- Next a%
- bUserAbort% = 0
- bIsSetupOK% = 1
- OptionCanClose% = 1
- Unload Form4
- End Sub
- Sub Commande2_Click ()
- If (iLanguage% = LANGUAGE_FRENCH) Then
- a% = MsgBox("Etes vous certain de vouloir abandonner l' installation?", 36)
- a% = MsgBox("Are you sure you wish to cancel this installation?", 36)
- End If
- If (a% = 6) Then
- OptionCanClose% = 1
- bIsSetupOK% = 0
- bUserAbort% = 1
- Unload Form4
- End If
- End Sub
- Sub Form_Load ()
- 'Form4.Move (Screen.Height / 2) - (Height / 2), (Screen.Width / 2) - (Width / 2), Width, Height
- Form4.Move (Screen.Width / 2) - (Width / 2), (Screen.Height / 2) - (Height / 2), Width, Height
- Form4.Caption = Dialog2Title$
- If (iLanguage% = LANGUAGE_FRENCH) Then
- Commande2.Caption = "&Abandonner"
- Cadre1.Caption = "Installer... "
- Etiquette1.Caption = "Taille de la s
- lection:"
- Etiquette2.Caption = "Espace disponible:"
- End If
- '-------------------------------------------------------
- 'CheckBoxes initialization
- '-------------------------------------------------------
- If (NumberOfSections% > 8) Then
- Beep
- MsgBox "This sample program doesn' t use more than 8 sections!"
- Exit Sub
- End If
- UserConfigSize& = 0
- For a% = 1 To NumberOfSections%
- If (Section(a%).Name$ <> "") Then
- Section(a%).lSize& = GetSectionSize(Section(a%).Name$)
- szTempSize$ = Str$(Section(a%).lSize&)
- If (Section(a%).bSelected% = 1) Then
- UserConfigSize& = UserConfigSize& + Section(a%).lSize&
- End If
- If (iLanguage% = LANGUAGE_FRENCH) Then
- szTempSize$ = szTempSize$ + " Ko."
- Else
- szTempSize$ = szTempSize$ + " Kb."
- End If
- If (iLanguage% = LANGUAGE_FRENCH) Then
- szTempLabel$ = Section(a%).FLabel$
- Else
- szTempLabel$ = Section(a%).ELabel$
- End If
- 'You probably will enhance this very bad method to enable the checkboxes...
- If (a% = 1) Then
- Coche1.Visible = 1
- Etiquette3.Visible = 1
- Coche1.Caption = szTempLabel$
- If (Section(a%).bSelected% = 1) Then
- Coche1.Value = 1
- Etiquette3.Caption = szTempSize$
- End If
- ElseIf (a% = 2) Then
- Coche2.Visible = 1
- Etiquette4.Visible = 1
- Coche2.Caption = szTempLabel$
- If (Section(a%).bSelected% = 1) Then
- Coche2.Value = 1
- Etiquette4.Caption = szTempSize$
- End If
- ElseIf (a% = 3) Then
- Coche3.Visible = 1
- Etiquette5.Visible = 1
- Coche3.Caption = szTempLabel$
- If (Section(a%).bSelected% = 1) Then
- Coche3.Value = 1
- Etiquette5.Caption = szTempSize$
- End If
- ElseIf (a% = 4) Then
- Coche4.Visible = 1
- Etiquette6.Visible = 1
- Coche4.Caption = szTempLabel$
- If (Section(a%).bSelected% = 1) Then
- Coche4.Value = 1
- Etiquette6.Caption = szTempSize$
- End If
- ElseIf (a% = 5) Then
- Coche5.Visible = 1
- Etiquette7.Visible = 1
- Coche5.Caption = szTempLabel$
- If (Section(a%).bSelected% = 1) Then
- Coche5.Value = 1
- Etiquette7.Caption = szTempSize$
- End If
- ElseIf (a% = 6) Then
- Coche6.Visible = 1
- Etiquette8.Visible = 1
- Coche6.Caption = szTempLabel$
- If (Section(a%).bSelected% = 1) Then
- Coche6.Value = 1
- Etiquette8.Caption = szTempSize$
- End If
- ElseIf (a% = 7) Then
- Coche7.Visible = 1
- Etiquette9.Visible = 1
- Coche7.Caption = szTempLabel$
- If (Section(a%).bSelected% = 1) Then
- Coche7.Value = 1
- Etiquette9.Caption = szTempSize$
- End If
- Else
- Coche8.Visible = 1
- Etiquette10.Visible = 1
- Coche8.Caption = szTempLabel$
- If (Section(a%).bSelected% = 1) Then
- Coche8.Value = 1
- Etiquette10.Caption = szTempSize$
- End If
- End If
- End If
- Next a%
- lFreeDiskSpace& = AskForDriveSpace(GetDriveNumber(UserPath))
- If (iLanguage% = LANGUAGE_FRENCH) Then
- SelLabel.Caption = Str$(UserConfigSize&) + " Ko."
- FreeLabel.Caption = Str$(lFreeDiskSpace&) + " Ko."
- SelLabel.Caption = Str$(UserConfigSize&) + " Kb."
- FreeLabel.Caption = Str$(lFreeDiskSpace&) + " Kb."
- End If
- End Sub
-