Ver Mensaje Individual
  #2 (permalink)  
Antiguo 28/04/2005, 22:32
alehawk
 
Fecha de Ingreso: junio-2002
Mensajes: 212
Antigüedad: 21 años, 10 meses
Puntos: 0
Aca tenes un ejemplo... copialo y pegalo para que veas la onda...

Public Class Form1
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents TabControl1 As System.Windows.Forms.TabControl
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents TabPage1 As System.Windows.Forms.TabPage
Friend WithEvents TabPage2 As System.Windows.Forms.TabPage
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.TabControl1 = New System.Windows.Forms.TabControl
Me.Button1 = New System.Windows.Forms.Button
Me.TabPage1 = New System.Windows.Forms.TabPage
Me.TabPage2 = New System.Windows.Forms.TabPage
Me.TabControl1.SuspendLayout()
Me.SuspendLayout()
'
'TabControl1
'
Me.TabControl1.Controls.Add(Me.TabPage1)
Me.TabControl1.Controls.Add(Me.TabPage2)
Me.TabControl1.Location = New System.Drawing.Point(7, 8)
Me.TabControl1.Name = "TabControl1"
Me.TabControl1.SelectedIndex = 0
Me.TabControl1.Size = New System.Drawing.Size(261, 202)
Me.TabControl1.TabIndex = 0
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(25, 237)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(74, 26)
Me.Button1.TabIndex = 1
Me.Button1.Text = "Button1"
'
'TabPage1
'
Me.TabPage1.Location = New System.Drawing.Point(4, 22)
Me.TabPage1.Name = "TabPage1"
Me.TabPage1.Size = New System.Drawing.Size(253, 176)
Me.TabPage1.TabIndex = 0
Me.TabPage1.Text = "TabPage1"
'
'TabPage2
'
Me.TabPage2.Location = New System.Drawing.Point(4, 22)
Me.TabPage2.Name = "TabPage2"
Me.TabPage2.Size = New System.Drawing.Size(253, 176)
Me.TabPage2.TabIndex = 1
Me.TabPage2.Text = "TabPage2"
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 273)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.TabControl1)
Me.Name = "Form1"
Me.Text = "Form1"
Me.TabControl1.ResumeLayout(False)
Me.ResumeLayout(False)

End Sub

#End Region

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim x() As TextBox, i As Int16
For i = 0 To 5
ReDim Preserve x(i)
x(i) = New TextBox
x(i).Text = "Boton " & i
If i <> 0 Then
x(i).Top = x(i - 1).Top + x(i).Height
End If
TabPage1.Controls.Add(x(i))
Next
End Sub
__________________
Simuladores y Examenes Cisco, Herramientas de Red Online - Tecnologia y Redes