I have an application on vb.net with visual studio 2017 and I need to click on any part of the form to run a sub with code. I tried to do it like this:
Public Sub Principal_Click() Handles Me.MouseClick
minuto = TimeOfDay.Minute
End Sub
To do it, I relied on the KeyPress event, and I thought it would work but it has not been like that. No matter how many times I click on any part of the form, I do not run that sub. I thank you in advance for the help you can give me!