VERSION 5.00 Begin VB.Form FormObstaculoNormal AutoRedraw = -1 'True BorderStyle = 1 'Fixed Single Caption = "Nuevo Obstaculo Normal" ClientHeight = 3600 ClientLeft = 45 ClientTop = 435 ClientWidth = 6000 LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 3600 ScaleWidth = 6000 StartUpPosition = 1 'CenterOwner Begin VB.Frame Frame1 Caption = "Ejemplo" Height = 2895 Left = 120 TabIndex = 16 Top = 120 Width = 3375 Begin VB.PictureBox Picture1 Height = 2415 Left = 120 Picture = "ObstaculoNormal.frx":0000 ScaleHeight = 2355 ScaleWidth = 3075 TabIndex = 17 Top = 360 Width = 3135 End End Begin VB.CommandButton Command2 Caption = "Cancelar" Height = 375 Left = 3120 TabIndex = 13 Top = 3120 Width = 1335 End Begin VB.CommandButton Command1 Caption = "Aceptar" Height = 375 Left = 1320 TabIndex = 12 Top = 3120 Width = 1335 End Begin VB.Frame Frame3 Caption = "Área Prohibida:" Height = 1455 Left = 3600 TabIndex = 7 Top = 1560 Width = 2175 Begin VB.TextBox Text1 Height = 285 Left = 1560 TabIndex = 15 Text = "3" Top = 1020 Width = 375 End Begin VB.TextBox Text5 Height = 285 Left = 1560 TabIndex = 9 Text = "3" Top = 300 Width = 375 End Begin VB.TextBox Text6 Height = 285 Left = 1560 TabIndex = 8 Text = "3" Top = 660 Width = 375 End Begin VB.Label Label1 AutoSize = -1 'True Caption = "Dcha (m) :" Height = 195 Left = 240 TabIndex = 14 Top = 1080 Width = 735 End Begin VB.Label Label3 AutoSize = -1 'True Caption = "Altura (m) :" Height = 195 Left = 240 TabIndex = 11 Top = 360 Width = 750 End Begin VB.Label Label6 AutoSize = -1 'True Caption = "Izda (m) :" Height = 195 Left = 240 TabIndex = 10 Top = 720 Width = 645 End End Begin VB.Frame Frame2 Caption = "Posición" Height = 1455 Left = 3600 TabIndex = 0 Top = 120 Width = 2175 Begin VB.TextBox Text2 Height = 285 Left = 1560 TabIndex = 3 Text = "5" Top = 300 Width = 375 End Begin VB.TextBox Text3 Height = 285 Left = 1560 TabIndex = 2 Text = "3" Top = 660 Width = 375 End Begin VB.TextBox Text4 Height = 285 Left = 1560 TabIndex = 1 Text = "3" Top = 1020 Width = 375 End Begin VB.Label Label2 AutoSize = -1 'True Caption = "X (m): " Height = 195 Left = 240 TabIndex = 6 Top = 360 Width = 450 End Begin VB.Label Label4 AutoSize = -1 'True Caption = "Altura (m) :" Height = 195 Left = 240 TabIndex = 5 Top = 720 Width = 750 End Begin VB.Label Label5 AutoSize = -1 'True Caption = "Anchura (m) :" Height = 195 Left = 240 TabIndex = 4 Top = 1080 Width = 945 End End Begin VB.Label Editando Caption = "NO" Height = 255 Left = 960 TabIndex = 19 Top = 3120 Visible = 0 'False Width = 255 End Begin VB.Label Label7 AutoSize = -1 'True Caption = "Editando :" Height = 195 Left = 120 TabIndex = 18 Top = 3120 Visible = 0 'False Width = 720 End End Attribute VB_Name = "FormObstaculoNormal" 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(FormObstaculoNormal.Text3.Text) < 0 Or _ CSng(FormObstaculoNormal.Text4.Text) < 0 Or _ CSng(FormObstaculoNormal.Text5.Text) < 0 Or _ CSng(FormObstaculoNormal.Text6.Text) < 0) Then MsgBox "Atención. Se han detectado longitudes negativas.", vbExclamation, "MitLoop" ElseIf (Len(FormObstaculoNormal.Text2.Text) = 0 Or _ Len(FormObstaculoNormal.Text3.Text) = 0 Or _ Len(FormObstaculoNormal.Text4.Text) = 0 Or _ Len(FormObstaculoNormal.Text5.Text) = 0 Or _ Len(FormObstaculoNormal.Text6.Text) = 0) Then MsgBox "Atención. Se han detectado casillas en blanco.", vbExclamation, "MitLoop" Else If (Editando = "NO") Then Module1.añadeObstaculoNormal 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 = 3 Text2.Text = 5 Text3.Text = 3 Text4.Text = 3 Text5.Text = 3 Text6.Text = 3 If (Principal.idioma = "Español") Then Me.Caption = "Nuevo Obstáculo" Frame1.Caption = "Ejemplo" Frame2.Caption = "Posición" Frame3.Caption = "Área Prohibida" Label1.Caption = "Dcha. (m.) :" Label3.Caption = "Altura (m.) :" Label4.Caption = "Altura (m.) :" Label5.Caption = "Anchura (m.) :" Label6.Caption = "Izda. (m.) :" Else Me.Caption = "New Obstacle" Frame1.Caption = "Example" Frame2.Caption = "Location" Frame3.Caption = "Forbidden Area" Label1.Caption = "Right (m.) :" Label3.Caption = "Forb. Height (m.) :" Label4.Caption = "Height (m.) :" Label5.Caption = "Width (m.) :" Label6.Caption = "Left (m.) :" End If End Sub