You are on page 1of 1

Imports System Imports System.Windows.Forms Imports System.

Drawing Public Class Form1 public clasub new() constrcuctor de formulario my base new()invocar al constructor de la clase base iniciar compnentes() end sub public sub new() iniciar componentes Private WithEvents btsaludo As Button Private WithEvents etsaludo As Label Private WithEvents tttooltilip As ToolTip Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.Even tArgs) Handles MyBase.Load etsaludo = New Label() btsaludo = New Button() tttooltilip = New ToolTip Controls.Add(etsaludo) ClientSize = New Size(292, 191) Name = "form1" Text = "saludo" End Sub Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.Ev entArgs) Handles Label1.Click etsaludo.Name = "etsaludo" etsaludo.Text = "etiqueta" etsaludo.Font = New Font("microsoft sans serif", 14, FontStyle.Regular) etsaludo.TextAlign = ContentAlignment.MiddleCenter etsaludo.Location = New Point(53, 48) etsaludo.Size = New Size(187, 35) etsaludo.TabIndex = 1 End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.E ventArgs) Handles Button1.Click btsaludo.Name = "btsaludo" btsaludo.Text = "haga &clic aqui" btsaludo.Location = New Point(53, 90) btsaludo.Size = New Size(187, 23) btsaludo.TabIndex = 0 tttooltilip.SetToolTip(btsaludo, "boton de pulsacion") End Sub Private Sub ToolTip1_Popup(ByVal sender As System.Object, ByVal e As System. Windows.Forms.PopupEventArgs) Handles ToolTip1.Popup End Sub End Class

You might also like