i have written the code and done it but the problem in the hotkey is working only inside the Form not outside as i intend to do can someone help me since i am a begginer in coding ?
Quote:
Public Class Form1
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Copy.Click
If TextBox1.SelectedText <> "" Then
Clipboard.SetText(TextBox1.SelectedText)
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim iData As IDataObject = Clipboard.GetDataObject()
If iData.GetDataPresent(DataFormats.Text) Then
TextBox1.SelectedText = CType(iData.GetData(DataFormats.Text), String)
Else
MsgBox(")
End If
End Sub
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.F8 Then
Button2.PerformClick()
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
KeyPreview = True
End Sub
End Class






a link of ASCII keys F1-F12.
