Mover con .Left() en vb.net 2010
Publicado por Jose Cavillas (4 intervenciones) el 08/01/2018 17:04:38
Hola, tengo un problemita que no puedo solucionar.
En tiempo de ejecucion creo lo siguiente:
Y en las ultima dos lineas lo agrego a un Panel que también es creado en tiempo de ejecucion.
Mi problema es el siguiente, quiero mover el Label1 a traves del .Left, pero no se como hacerle referencia.
Alguien me puede ayudar?
En tiempo de ejecucion creo lo siguiente:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
'creo el label
Dim Label1 = New System.Windows.Forms.Label()
Label1.AutoSize = True
Label1.Location = New System.Drawing.Point(5, 2)
Label1.Name = "Label1"
' Label1.Size = New System.Drawing.Size(39, 13)
Label1.Text = "ESCRIBIR"
Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Label1.ForeColor = Color.White
'creo el textbox
Dim txt = New System.Windows.Forms.TextBox()
txt.Location = New System.Drawing.Point(100, 2)
txt.Size = New System.Drawing.Size(300, 20)
Me.PanelContenedor.Controls(_PanelName).Controls.Add(Label1)
Me.PanelContenedor.Controls(_PanelName).Controls.Add(txt)
Y en las ultima dos lineas lo agrego a un Panel que también es creado en tiempo de ejecucion.
Mi problema es el siguiente, quiero mover el Label1 a traves del .Left, pero no se como hacerle referencia.
Alguien me puede ayudar?
Valora esta pregunta


0