VERSION 5.00 Begin VB.Form Form1 BorderStyle = 1 'Fixed Single Caption = "Instal·lacio de ""Chikito Commander (TM)""" ClientHeight = 1680 ClientLeft = 45 ClientTop = 375 ClientWidth = 4335 LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 1680 ScaleWidth = 4335 StartUpPosition = 3 'Windows Default Begin VB.CommandButton Command1 Caption = "Instal·la" Enabled = 0 'False Height = 375 Left = 120 TabIndex = 6 Top = 1200 Width = 4095 End Begin VB.ComboBox Combo1 Enabled = 0 'False Height = 315 Left = 1800 TabIndex = 5 Text = "Tria" Top = 480 Width = 855 End Begin VB.TextBox Text2 Enabled = 0 'False Height = 285 Left = 1800 TabIndex = 3 Text = "C:\Archivos de programa\ChC" Top = 840 Width = 2415 End Begin VB.TextBox Text1 Height = 285 Left = 1800 TabIndex = 1 Text = "1234567890123456789012345" Top = 120 Width = 2415 End Begin VB.Label Label3 Caption = "3. Carpeta de destí:" Enabled = 0 'False Height = 255 Left = 120 TabIndex = 4 Top = 840 Width = 1455 End Begin VB.Label Label2 Caption = "2. Unitats de disc:" Enabled = 0 'False Height = 255 Left = 120 TabIndex = 2 Top = 480 Width = 1575 End Begin VB.Label Label1 Caption = "1. Número de sèrie:" Height = 255 Left = 120 TabIndex = 0 Top = 120 Width = 1455 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Sub Combo1_KeyPress(KeyAscii As Integer) 'ESCOLTA EL INTRO (2 PUNTS) If KeyAscii = 13 Then 'AMAGA (1 PUNT) Label1.Enabled = 0 Text1.Enabled = 0 Label2.Enabled = 0 Combo1.Enabled = 0 Label3.Enabled = 1 Text2.Enabled = 1 Text2.SetFocus Command1.Enabled = 0 End If End Sub Private Sub Form_Load() 'OMPLE EL COMBO (1 PUNT) Combo1.AddItem "C:" Combo1.AddItem "D:" Combo1.AddItem "E:" End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) 'ESCOLTA EL INTRO (2 PUNTS) If KeyAscii = 13 Then 'COMPROVA EL NUMERO DE SERIE (1 PUNT) If Text1.Text <> "1234567890123456789012345" Then 'MISSATGE ERROR (1 PUNT) missatge = MsgBox("Número de sèrie incorrecte", vbOKOnly + vbCritical, "Error") Else 'AMAGA (1 PUNT) Label1.Enabled = 0 Text1.Enabled = 0 Label2.Enabled = 1 Combo1.Enabled = 1 Label3.Enabled = 1 Text2.Enabled = 1 Combo1.SetFocus Command1.Enabled = 0 End If End If 'NOMES NUMEROS (1 PUNT) If KeyAscii > 57 Or KeyAscii < 48 Then KeyAscii = 0 End Sub Private Sub Combo1_Click() 'CANVIA DIRECTORI (1 PUNT) Text2.Text = Combo1.Text & "\Archivos de programas\ChC" End Sub Private Sub Command1_Click() 'MOSTRA MISSATGE (1 PUNT) missatge = MsgBox("Instal·lat amb èxit al directori: " & Text2.Text, vbOKOnly + vbInformation, "Chikito Commander (TM)") 'ACABA (1 PUNT) End End Sub Private Sub Text2_KeyPress(KeyAscii As Integer) 'ESCOLTA EL INTRO (2 PUNTS) If KeyAscii = 13 Then 'AMAGA (1 PUNT) Label1.Enabled = 0 Text1.Enabled = 0 Label2.Enabled = 0 Combo1.Enabled = 0 Label3.Enabled = 0 Text2.Enabled = 0 Command1.Enabled = 1 Command1.SetFocus End If End Sub