diff --git a/Form1.Designer.vb b/Form1.Designer.vb index 5aa193a..dd4fdf5 100644 --- a/Form1.Designer.vb +++ b/Form1.Designer.vb @@ -23,6 +23,7 @@ Partial Class Form1 _ Private Sub InitializeComponent() Me.Button1 = New System.Windows.Forms.Button() + Me.Button2 = New System.Windows.Forms.Button() Me.SuspendLayout() ' 'Button1 @@ -34,11 +35,21 @@ Partial Class Form1 Me.Button1.Text = "Action1" Me.Button1.UseVisualStyleBackColor = True ' + 'Button2 + ' + Me.Button2.Location = New System.Drawing.Point(310, 178) + Me.Button2.Name = "Button2" + Me.Button2.Size = New System.Drawing.Size(128, 45) + Me.Button2.TabIndex = 1 + Me.Button2.Text = "Action2" + Me.Button2.UseVisualStyleBackColor = True + ' 'Form1 ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(800, 450) + Me.Controls.Add(Me.Button2) Me.Controls.Add(Me.Button1) Me.Name = "Form1" Me.Text = "Form1" @@ -47,4 +58,5 @@ Partial Class Form1 End Sub Friend WithEvents Button1 As Button + Friend WithEvents Button2 As Button End Class diff --git a/Form1.vb b/Form1.vb index bfcb44e..c966774 100644 --- a/Form1.vb +++ b/Form1.vb @@ -2,4 +2,8 @@ Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click MessageBox.Show("hier käme Action1") End Sub + + Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click + MessageBox.Show("hier käme Action2") + End Sub End Class