VERSION 5.00 Begin VB.Form FormObstaculoElevadoI AutoRedraw = -1 'True BorderStyle = 1 'Fixed Single Caption = "Nuevo Obstáculo Elevado" ClientHeight = 3570 ClientLeft = 45 ClientTop = 435 ClientWidth = 5970 LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 3570 ScaleWidth = 5970 StartUpPosition = 1 'CenterOwner Begin VB.Frame Frame2 Caption = "Configuración del Obstáculo" Height = 3495 Left = 3360 TabIndex = 4 Top = 0 Width = 2535 Begin VB.TextBox Text1 Height = 285 Left = 1920 TabIndex = 11 Top = 300 Width = 375 End Begin VB.TextBox Text2 Height = 285 Left = 1920 TabIndex = 10 Top = 660 Width = 375 End Begin VB.TextBox Text3 Height = 285 Left = 1920 TabIndex = 9 Top = 1020 Width = 375 End Begin VB.TextBox Text8 Height = 285 Left = 1920 TabIndex = 8 Top = 2700 Width = 375 End Begin VB.TextBox Text7 Height = 285 Left = 1920 TabIndex = 7 Top = 2340 Width = 375 End Begin VB.TextBox Text5 Height = 285 Left = 1920 TabIndex = 6 Top = 1980 Width = 375 End Begin VB.TextBox Text6 Height = 285 Left = 1920 TabIndex = 5 Top = 3060 Width = 375 End Begin VB.Line Line1 X1 = 120 X2 = 2400 Y1 = 1680 Y2 = 1680 End Begin VB.Label Label2 AutoSize = -1 'True Caption = "X (m): " Height = 195 Left = 120 TabIndex = 18 Top = 360 Width = 450 End Begin VB.Label Label4 AutoSize = -1 'True Caption = "Altura (m) :" Height = 195 Left = 120 TabIndex = 17 Top = 720 Width = 750 End Begin VB.Label Label5 AutoSize = -1 'True Caption = "Anchura (m) :" Height = 195 Left = 120 TabIndex = 16 Top = 1080 Width = 945 End Begin VB.Label Label8 AutoSize = -1 'True Caption = "Dcha (m) :" Height = 195 Left = 120 TabIndex = 15 Top = 2760 Width = 735 End Begin VB.Label Label7 AutoSize = -1 'True Caption = "Izda (m) :" Height = 195 Left = 120 TabIndex = 14 Top = 2400 Width = 645 End Begin VB.Label Label3 AutoSize = -1 'True Caption = "Altura Prohibida (m) :" Height = 195 Left = 120 TabIndex = 13 Top = 2040 Width = 1455 End Begin VB.Label Label6 AutoSize = -1 'True Caption = "Inferior (m) :" Height = 195 Left = 120 TabIndex = 12 Top = 3120 Width = 825 End End Begin VB.CommandButton Command1 Caption = "Aceptar" Height = 375 Left = 360 TabIndex = 3 Top = 3120 Width = 1095 End Begin VB.CommandButton Command2 Caption = "Cancelar" Height = 375 Left = 1800 TabIndex = 2 Top = 3120 Width = 1095 End Begin VB.Frame Frame1 Caption = "Ejemplo" Height = 3015 Left = 50 TabIndex = 0 Top = 0 Width = 3255 Begin VB.PictureBox Picture1 Height = 2655 Left = 120 Picture = "FormObstaculoElevadoI.frx":0000 ScaleHeight = 2595 ScaleWidth = 2955 TabIndex = 1 Top = 240 Width = 3015 End End Begin VB.Label Editando AutoSize = -1 'True Caption = "NO" Height = 195 Left = 0 TabIndex = 19 Top = 3120 Visible = 0 'False Width = 240 End End Attribute VB_Name = "FormObstaculoElevadoI" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Private Sub Command1_Click() ' No puede haber longitudes negativas If (CSng(FormObstaculoElevadoI.Text2.Text) < 0 Or _ CSng(FormObstaculoElevadoI.Text3.Text) < 0 Or _ CSng(FormObstaculoElevadoI.Text5.Text) < 0 Or _ CSng(FormObstaculoElevadoI.Text6.Text) < 0 Or _ CSng(FormObstaculoElevadoI.Text7.Text) < 0 Or _ CSng(FormObstaculoElevadoI.Text8.Text) < 0) Then MsgBox "Atención. Se han detectado longitudes negativas.", vbExclamation, "MitLoop" ' No puede haber casillas vacías ElseIf (Len(FormObstaculoElevadoI.Text1.Text) = 0 Or _ Len(FormObstaculoElevadoI.Text2.Text) = 0 Or _ Len(FormObstaculoElevadoI.Text3.Text) = 0 Or _ Len(FormObstaculoElevadoI.Text5.Text) = 0 Or _ Len(FormObstaculoElevadoI.Text6.Text) = 0 Or _ Len(FormObstaculoElevadoI.Text7.Text) = 0 Or _ Len(FormObstaculoElevadoI.Text8.Text) = 0) Then MsgBox "Atención. Se han detectado casillas en blanco.", vbExclamation, "MitLoop" Else If (Editando = "NO") Then Module1.añadeObstaculoElevadoI Else Me.Hide End If End If End Sub Private Sub Command2_Click() Module1.HaCancelado = True Unload Me End Sub Private Sub Form_Load() Text1.Text = 5 Text2.Text = 5 Text3.Text = 3 Text5.Text = 3 Text6.Text = 3 Text7.Text = 3 Text8.Text = 3 If (Principal.idioma = "Español") Then Me.Caption = "Nuevo Obstáculo Elevado" Frame1.Caption = "Ejemplo" Frame2.Caption = "Configuración del Obstáculo" Label3.Caption = "Altura Prohibida (m.) :" Label4.Caption = "Altura (m.) :" Label5.Caption = "Anchura (m.) :" Label6.Caption = "Inferior (m.) :" Label7.Caption = "Izda (m.) :" Label8.Caption = "Dcha (m.) :" Command1.Caption = "Aceptar" Command2.Caption = "Cancelar" Else Me.Caption = "New Obstacle" Frame1.Caption = "Example" Frame2.Caption = "Obstacle Configuration" Label3.Caption = "Forbidden Height (m.) :" Label4.Caption = "Height (m.) :" Label5.Caption = "Width (m.) :" Label6.Caption = "To-ground Distance (m.) :" Label7.Caption = "Left (m.) :" Label8.Caption = "Right (m.) :" Command1.Caption = "OK" Command2.Caption = "Cancel" End If End Sub