VERSION 5.00 Begin VB.Form Form2condhoriz AutoRedraw = -1 'True BorderStyle = 1 'Fixed Single Caption = "Nuevo grupo de conductores" ClientHeight = 3345 ClientLeft = 45 ClientTop = 435 ClientWidth = 7680 LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 3345 ScaleWidth = 7680 StartUpPosition = 1 'CenterOwner Begin VB.Frame Frame1 Caption = "Fase Duplex Horizontal" Height = 3135 Left = 120 TabIndex = 0 Top = 120 Width = 7455 Begin VB.Frame Frame4 Caption = "Ejemplo" Height = 2775 Left = 120 TabIndex = 24 Top = 240 Width = 3050 Begin VB.PictureBox Picture1 Height = 2145 Left = 100 Picture = "Form2condhoriz.frx":0000 ScaleHeight = 2085 ScaleWidth = 2775 TabIndex = 25 Top = 300 Width = 2835 End End Begin VB.Frame Frame3 Caption = "Datos Eléctricos por fase" Height = 735 Left = 3240 TabIndex = 18 Top = 1800 Width = 4095 Begin VB.TextBox Text8 Height = 285 Left = 3360 TabIndex = 7 Top = 300 Width = 495 End Begin VB.TextBox Text6 Height = 285 Left = 1680 TabIndex = 6 Top = 300 Width = 495 End Begin VB.Label Label8 Caption = "Fase (°) :" Height = 195 Left = 2400 TabIndex = 23 Top = 360 Width = 1005 End Begin VB.Label Label6 Caption = "I fase (A,rms) :" Height = 195 Left = 120 TabIndex = 22 Top = 360 Width = 1575 End End Begin VB.Frame Frame2 Caption = "Datos Geométricos" Height = 1455 Left = 3240 TabIndex = 12 Top = 240 Width = 4095 Begin VB.OptionButton Option2 Caption = "2" Height = 255 Left = 1560 TabIndex = 21 Top = 1080 Width = 495 End Begin VB.OptionButton Option1 Caption = "1" Height = 255 Left = 1080 TabIndex = 20 Top = 1080 Value = -1 'True Width = 495 End Begin VB.TextBox Text4 Height = 285 Left = 3120 TabIndex = 4 Top = 660 Width = 495 End Begin VB.TextBox Text5 Height = 285 Left = 3120 TabIndex = 5 Top = 1020 Width = 495 End Begin VB.TextBox Text3 Height = 285 Left = 3120 TabIndex = 3 Top = 300 Width = 495 End Begin VB.TextBox Text2 Height = 285 Left = 1200 TabIndex = 2 Top = 720 Width = 495 End Begin VB.TextBox Text1 Height = 285 Left = 1200 TabIndex = 1 Top = 360 Width = 495 End Begin VB.Label Label4 Caption = "Línea :" Height = 195 Left = 240 TabIndex = 19 Top = 1080 Width = 855 End Begin VB.Label Label9 Caption = "d1 (m.) :" Height = 195 Left = 2160 TabIndex = 17 Top = 720 Width = 810 End Begin VB.Label Label10 Caption = "d2 (m.) :" Height = 255 Left = 2160 TabIndex = 16 Top = 1080 Width = 975 End Begin VB.Label Label3 Caption = "d (m.) :" Height = 195 Left = 2160 TabIndex = 15 Top = 360 Width = 720 End Begin VB.Label Label2 Caption = "Y (m.) :" Height = 195 Left = 240 TabIndex = 14 Top = 720 Width = 855 End Begin VB.Label Label1 Caption = "X (m.) :" Height = 195 Left = 240 TabIndex = 13 Top = 360 Width = 735 End End Begin VB.CommandButton Command3 Caption = "Aceptar" Height = 375 Left = 4080 TabIndex = 8 Top = 2640 Width = 1095 End Begin VB.CommandButton Command4 Caption = "Cancelar" Height = 375 Left = 5400 TabIndex = 9 Top = 2640 Width = 1095 End Begin VB.Label Editando AutoSize = -1 'True Caption = "NO" Height = 195 Left = 1560 TabIndex = 11 Top = 2640 Visible = 0 'False Width = 240 End Begin VB.Label Label5 AutoSize = -1 'True Caption = "Editando:" Height = 195 Left = 840 TabIndex = 10 Top = 2640 Visible = 0 'False Width = 675 End End End Attribute VB_Name = "Form2condhoriz" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Private Sub Command3_Click() If (Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" _ Or Text4.Text = "" Or Text5.Text = "") Then If Principal.idioma = "Eapañol" Then MsgBox "Atención. No puede dejar en blanco ninguna casilla", vbExclamation, "MitLoop" Else MsgBox "Please fill in all required fields.", vbExclamation, "MitLoop" End If ElseIf Not (IsNumeric(Text1.Text) And IsNumeric(Text2.Text) And IsNumeric(Text3.Text) And _ IsNumeric(Text4.Text) And IsNumeric(Text5.Text) And IsNumeric(Text6.Text) And _ IsNumeric(Text8.Text)) Then If Principal.idioma = "Español" Then MsgBox "Hay números con formato incorrecto", vbExclamation, "MitLoop" Else MsgBox "There are invalid numbers", vbExclamation, "MitLoop" End If ElseIf (InStr(1, Text1.Text, ".") <> 0 Or InStr(1, Text2.Text, ".") <> 0 Or _ InStr(1, Text3.Text, ".") <> 0 Or InStr(1, Text4.Text, ".") <> 0 Or _ InStr(1, Text5.Text, ".") <> 0 Or InStr(1, Text6.Text, ".") <> 0 Or _ InStr(1, Text8.Text, ".") <> 0) Then If Principal.idioma = "Español" Then MsgBox "Utilize ',' como separador decimal", vbInformation, "MitLoop" Else MsgBox "Please use ',' as decimal separator", vbInformation, "MitLoop" End If ElseIf (CSng(Text4.Text) < 0 Or CSng(Text5.Text) < 0) Then If Principal.idioma = "Español" Then MsgBox "Atención. Los diámetros no pueden ser negativos.", vbExclamation, "MitLoop" Else MsgBox "Diameters must be non-negative.", vbExclamation, "MitLoop" End If Else If (Editando = "NO") Then Module1.añade2condhoriz Else Me.Hide End If End If End Sub Private Sub Command4_Click() Module1.HaCancelado = True Unload Me End Sub Private Sub Form_Load() ' Pone los valores por defecto Text1.Text = 20 Text2.Text = 10 Text3.Text = 0.4 Text4.Text = 2 Text5.Text = 2 Text6.Text = 500 Text8.Text = 0 Option1.Value = True If (Principal.idioma = "Español") Then Me.Caption = "Nueva Fase Dúplex Horizontal" Frame1.Caption = "Fase Duplex Horizontal" Frame2.Caption = "Parámetros Geométricos" Frame3.Caption = "Parámetros Eléctricos" Frame4.Caption = "Ejemplo" Label4.Caption = "Línea" Label8.Caption = "Fase (º):" Label6.Caption = "I fase (A, rms):" Command3.Caption = "Aceptar" Command4.Caption = "Cancel" Else Me.Caption = "New Duplex Horizontal Phase." Frame1.Caption = "Duplex Horizontal Phase" Frame2.Caption = "Geometric parameters" Frame3.Caption = "Electric parameters" Frame4.Caption = "Example" Label4.Caption = "Line" Label6.Caption = "Phase I (A, rms):" Label8.Caption = "Phase (º):" Command3.Caption = "OK" Command4.Caption = "Cancel" End If End Sub