Hello,
Thank you for the info, but it did not work:
Public Class MainForm
Private Sub MainForm_KeyUp(sender As Object, e As KeyEventArgs) Handles Me.KeyUp
If e.Alt AndAlso e.KeyCode = Keys.W Then
BasicButton1.PerformClick()
End If
End Sub
'*******************************************************************************
'* Stop polling when the form is not visible in order to reduce communications
'* Copy this section of code to every new form created
'*******************************************************************************
Private Sub Form_VisibleChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.VisibleChanged
AdvancedHMIDrivers.Utilities.StopComsOnHidden(components, Me)
End Sub
'**************************************
'* Filling the form with a gradient
'**************************************
'Private Sub MainForm_Paint(sender As Object, e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
'Dim rect As New System.Drawing.Rectangle(0, 0, e.ClipRectangle.Width, e.ClipRectangle.Height)
'Dim gradientBrush As New Drawing.Drawing2D.LinearGradientBrush(New Point(0, 0), New Point(0, Height), System.Drawing.Color.FromArgb(180, 100, 200), System.Drawing.Color.FromArgb(110, 200, 255))
'e.Graphics.FillRectangle(gradientBrush, rect)
'End Sub
Private Sub BasicButton1_Click(sender As Object, e As EventArgs) Handles BasicButton1.Click
End Sub
Private Sub BasicButton7_Click(sender As Object, e As EventArgs) Handles BasicButton7.Click
End Sub
Private Sub BasicButton2_Click(sender As Object, e As EventArgs) Handles BasicButton2.Click
End Sub
I have posted all the code I have at present.
Thank you very much.
If there is a better way. I would like to know. I am energizing: O:9/3.
When I press the button it energizes: O:9/3. When I let go, it stop.
Thank you