Buscar

lista de numeros 2

Esta é uma pré-visualização de arquivo. Entre para ver o arquivo original

VERSION 5.00
Begin VB.Form frmNumeros2 
 Caption = "Lista Numeros"
 ClientHeight = 3105
 ClientLeft = 60
 ClientTop = 435
 ClientWidth = 4680
 LinkTopic = "Form1"
 Picture = "frmNumeros2.frx":0000
 ScaleHeight = 3105
 ScaleWidth = 4680
 StartUpPosition = 3 'Windows Default
 Begin VB.CommandButton cmdSalir 
 BackColor = &H00008000&
 Caption = "Salir"
 BeginProperty Font 
 Name = "MS Sans Serif"
 Size = 9.75
 Charset = 0
 Weight = 700
 Underline = 0 'False
 Italic = 0 'False
 Strikethrough = 0 'False
 EndProperty
 Height = 315
 Left = 360
 Style = 1 'Graphical
 TabIndex = 3
 Top = 2280
 Width = 975
 End
 Begin VB.CommandButton cmdLeer 
 BackColor = &H00008000&
 Caption = "Leer"
 BeginProperty Font 
 Name = "MS Sans Serif"
 Size = 9.75
 Charset = 0
 Weight = 700
 Underline = 0 'False
 Italic = 0 'False
 Strikethrough = 0 'False
 EndProperty
 Height = 315
 Left = 360
 Style = 1 'Graphical
 TabIndex = 2
 Top = 1080
 Width = 975
 End
 Begin VB.TextBox txtPosicion 
 Alignment = 2 'Center
 Height = 285
 Left = 3240
 Locked = -1 'True
 TabIndex = 1
 Top = 360
 Width = 495
 End
 Begin VB.ListBox lstDatos 
 Height = 2010
 Left = 1800
 TabIndex = 0
 Top = 840
 Visible = 0 'False
 Width = 2535
 End
 Begin VB.Label lblTexto 
 AutoSize = -1 'True
 BackStyle = 0 'Transparent
 Caption = "Teclea 5 numeros"
 BeginProperty Font 
 Name = "MS Sans Serif"
 Size = 12
 Charset = 0
 Weight = 700
 Underline = 0 'False
 Italic = 0 'False
 Strikethrough = 0 'False
 EndProperty
 ForeColor = &H0080FFFF&
 Height = 300
 Left = 0
 TabIndex = 5
 Top = 0
 Width = 2145
 End
 Begin VB.Label lblposicion 
 BackStyle = 0 'Transparent
 Caption = "Posici�n"
 BeginProperty Font 
 Name = "MS Sans Serif"
 Size = 12
 Charset = 0
 Weight = 700
 Underline = 0 'False
 Italic = 0 'False
 Strikethrough = 0 'False
 EndProperty
 ForeColor = &H0080FFFF&
 Height = 255
 Left = 2040
 TabIndex = 4
 Top = 360
 Width = 1095
 End
End
Attribute VB_Name = "frmNumeros2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
 Dim arreglo(4) As String * 20
 Dim i As Integer
Private Sub cmdLeer_Click()
 If Val(txtPosicion) < 5 Then
 Dim N As String
 Do
 N = InputBox("Teclea solamente n�meros", "Leer arreglo")
 If Not IsNumeric(N) Then
 MsgBox ("Solamente se aceptan numeros.")
 End If
 Loop Until IsNumeric(N)
 arreglo(txtPosicion) = N
 txtPosicion = Val(txtPosicion + 1)
 lstDatos.Visible = True
 For i = 0 To 4
 lstDatos.List(i) = arreglo(i)
 Next
 Else
 cmdLeer.Enabled = False
 End If
End Sub
Private Sub cmdSalir_Click()
 Beep
 End
End Sub
Private Sub Form_Load()
 arreglo(0) = "aaaaaaaaaaaaaaaaaaaa"
 txtPosicion = "0"
End Sub

Teste o Premium para desbloquear

Aproveite todos os benefícios por 3 dias sem pagar! 😉
Já tem cadastro?

Continue navegando