VERSION 5.00 Begin VB.Form Form9 BackColor = &H00C0CEC0& BorderStyle = 4 'Fixed ToolWindow Caption = "Insertar primera pieza" ClientHeight = 5085 ClientLeft = 45 ClientTop = 345 ClientWidth = 5265 ForeColor = &H00000000& LinkTopic = "Form9" MaxButton = 0 'False MDIChild = -1 'True MinButton = 0 'False ScaleHeight = 889.764 ScaleMode = 0 'User ScaleWidth = 3025.862 ShowInTaskbar = 0 'False Begin VB.Frame Frame1 BackColor = &H00C0CEC0& Caption = "Frame1" Height = 3735 Left = 120 TabIndex = 10 Top = 120 Width = 5055 Begin VB.CheckBox Check2 Caption = "Check1" Height = 195 Left = 2760 TabIndex = 7 Top = 3240 Width = 255 End Begin VB.CheckBox Check1 Caption = "Check1" Height = 195 Left = 2760 TabIndex = 6 Top = 2880 Width = 255 End Begin VB.TextBox Text6 Height = 285 Left = 2520 TabIndex = 5 ToolTipText = "Utilice la coma (,) como separador decimal" Top = 2520 Width = 735 End Begin VB.TextBox Text5 Height = 285 Left = 2520 TabIndex = 4 ToolTipText = "Utilice la coma (,) como separador decimal" Top = 2160 Width = 735 End Begin VB.TextBox Text4 Height = 285 Left = 2520 TabIndex = 3 ToolTipText = "Utilice la coma (,) como separador decimal" Top = 1800 Width = 735 End Begin VB.TextBox Text3 Height = 285 Left = 2520 TabIndex = 2 ToolTipText = "Utilice la coma (,) como separador decimal" Top = 1440 Width = 735 End Begin VB.TextBox Text2 Height = 285 Left = 2520 TabIndex = 1 ToolTipText = "Utilice la coma (,) como separador decimal" Top = 1080 Width = 735 End Begin VB.TextBox Text1 Height = 285 Left = 2520 TabIndex = 0 Top = 480 Width = 2415 End Begin VB.Label Label7 Alignment = 2 'Center BackColor = &H00C0E0FF& BorderStyle = 1 'Fixed Single Caption = "¿Acabado Cromo?" Height = 255 Left = 120 TabIndex = 18 Top = 2880 Width = 2055 End Begin VB.Label Label9 Alignment = 2 'Center BackColor = &H00C0E0FF& BorderStyle = 1 'Fixed Single Caption = "¿Pieza Conjunto?" Height = 255 Left = 120 TabIndex = 17 Top = 3240 Width = 2055 End Begin VB.Label Label8 Alignment = 2 'Center BackColor = &H00C0E0FF& BorderStyle = 1 'Fixed Single Caption = "Unidades por producto" Height = 255 Left = 120 TabIndex = 16 Top = 2520 Width = 2055 End Begin VB.Label Label6 Alignment = 2 'Center BackColor = &H00C0E0FF& BorderStyle = 1 'Fixed Single Caption = "Medida 2(diámetro2):" Height = 255 Left = 120 TabIndex = 15 Top = 2160 Width = 2055 End Begin VB.Label Label5 Alignment = 2 'Center BackColor = &H00C0E0FF& BorderStyle = 1 'Fixed Single Caption = "Medida 1(diámetro/ancho):" Height = 255 Left = 120 TabIndex = 14 Top = 1800 Width = 2055 End Begin VB.Label Label1 Alignment = 2 'Center BackColor = &H00C0E0FF& Caption = "Descripción pieza:" ForeColor = &H00000000& Height = 255 Left = 120 TabIndex = 13 Top = 480 Width = 2055 End Begin VB.Label Label4 Alignment = 2 'Center BackColor = &H00C0E0FF& BorderStyle = 1 'Fixed Single Caption = "Espesor:" Height = 255 Left = 120 TabIndex = 12 Top = 1440 Width = 2055 End Begin VB.Label Label3 Alignment = 2 'Center BackColor = &H00C0E0FF& BorderStyle = 1 'Fixed Single Caption = "Longitud:" Height = 255 Left = 120 TabIndex = 11 Top = 1080 Width = 2055 End End Begin VB.CommandButton Command2 Caption = "Cancelar" Height = 375 Left = 720 TabIndex = 9 Top = 4440 Width = 1575 End Begin VB.CommandButton Command1 BackColor = &H00E0E0E0& Caption = "Siguiente" Height = 375 Left = 2520 MaskColor = &H00E0E0E0& Style = 1 'Graphical TabIndex = 8 Top = 4440 Width = 1575 End End Attribute VB_Name = "Form9" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Sub Command1_Click() If Text1.Text = "" Then MsgBox "Por favor, rellene el campo Descripción", vbExclamation ElseIf Text2.Text = "" Then MsgBox "Por favor, rellene el campo Longitud (si no procede, escriba 0)", vbExclamation ElseIf Text3.Text = "" Then MsgBox "Por favor, rellene el campo Espesor (si no procede, escriba 0)", vbExclamation ElseIf Text4.Text = "" Then MsgBox "Por favor, rellene el campo Medida1 (si no procede, escriba 0)", vbExclamation ElseIf Text5.Text = "" Then MsgBox "Por favor, rellene el campo Medida2 (si no procede, escriba 0)", vbExclamation ElseIf Text6.Text = "" Then MsgBox "Por favor, rellene el campo Unidades por producto(si no procede, escriba 0)", vbExclamation ElseIf 0 = 0 Then 'paso de datos a variables globales gpieza.descripcion = Text1.Text gpieza.longitud = CDbl(Text2.Text) gpieza.espesor = CDbl(Text3.Text) gpieza.medida1 = CDbl(Text4.Text) gpieza.medida2 = CDbl(Text5.Text) gpieza.acabado = Check1.Value gpieza.unidades = Text6.Text gpieza.conjunto = Check2.Value Form9.Visible = False Form11.Visible = True End If End Sub Private Sub Command2_Click() Form9.Hide End Sub Private Sub Form_Load() Frame1.Caption = "Producto: " & gproducto.referencia & " " & gproducto.descripcion ' centrar el formulario en la parte superior Move (Screen.Width - Width) \ 2, 1500 End Sub Private Sub Text1_Validate(Cancel As Boolean) If IsNumeric(Text1.Text) Then Cancel = True End If If Cancel Then MsgBox "Por favor, escriba una descripción correcta para la pieza", vbExclamation End If End Sub Private Sub Text2_Validate(Cancel As Boolean) If Not IsNumeric(Text2.Text) Then Cancel = True ElseIf CDbl(Text2.Text) < 0 Then Cancel = True End If If Cancel Then MsgBox "Por favor, escriba un dato numérico correcto (0 para cancelar)", vbExclamation End If End Sub Private Sub Text3_Validate(Cancel As Boolean) If Not IsNumeric(Text3.Text) Then Cancel = True ElseIf CDbl(Text3.Text) < 0 Then Cancel = True End If If Cancel Then MsgBox "Por favor, escriba un dato numérico correcto (0 para cancelar)", vbExclamation End If End Sub Private Sub Text4_Validate(Cancel As Boolean) If Not IsNumeric(Text4.Text) Then Cancel = True ElseIf CDbl(Text4.Text) < 0 Then Cancel = True End If If Cancel Then MsgBox "Por favor, escriba un dato numérico correcto (0 para cancelar)", vbExclamation End If End Sub Private Sub Text5_Validate(Cancel As Boolean) If Not IsNumeric(Text5.Text) Then Cancel = True ElseIf CDbl(Text5.Text) < 0 Then Cancel = True End If If Cancel Then MsgBox "Por favor, escriba un dato numérico correcto (0 para cancelar)", vbExclamation End If End Sub Private Sub Text6_Validate(Cancel As Boolean) If Not IsNumeric(Text6.Text) Then Cancel = True ElseIf CDbl(Text6.Text) < 0 Then Cancel = True End If If Cancel Then MsgBox "Por favor, escriba un número entero correcto (0 para cancelar)", vbExclamation End If End Sub