event does not trigger

  • Thread starter Thread starter Vergassivellaunus
  • Start date Start date
V

Vergassivellaunus

Guest
Using a control from tool bar is very easy to make it work, but I have created a control not following

the graphic way.

In my form (geometry2) i have added 2 buttons; when i click on them nothing happens:

The code is this:

Private Sub Form_geometry2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim i As Integer
Dim OK As New Button
Dim Esci As New Button

Me.Controls.Clear()

Me.Left = 100
Me.Width = Form_base.Width - 200

OK.Left = 100
Esci.Left = Me.Width - Esci.Width - 50
OK.Top = 300
Esci.Top = 300
OK.Text = "OK"
Esci.Text = "EXIT"
OK.Enabled = True
Me.Controls.Add(OK)
Me.Controls.Add(Esci)

End Sub

Private Sub Ok_click(sender As Object, e As EventArgs) Handles Me.Click
'I do not reach this point clicking
End Sub


Thanks, Enzo

Continue reading...
 

Similar threads

V
Replies
0
Views
257
Vergassivellaunus
V
V
Replies
0
Views
154
Vergassivellaunus
V
Back
Top