First VB '10 Injector
Ok, so for a few hours now I've been working on making an injector. I got it all written and stuff,,, it's just the error that I keep getting when I try to Build or Debug.
Error is as follows, "Handles clause requires a 'WithEvents' variable defined in the containing type or one of its base types"
Here is the Sub it's from: (the red highlight is what is giving the error)
I've looked up sooooo much stuff on the internet, I've looked at dozens of google pages but I just can't get it figured out. So if anyone out there knows what to do or how to fix this, it would be greatly appreciated 
Error is as follows, "Handles clause requires a 'WithEvents' variable defined in the containing type or one of its base types"
Here is the Sub it's from: (the red highlight is what is giving the error)
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
OpenFileDialog1.Filter = "DLL (*.dll) |*.dll| (*.*) |*.*"
OpenFileDialog1.ShowDialog()
Dim FileName As String
FileName = OpenFileDialog1.FileName.Substring(OpenFileDialog1.FileName.LastIndexOf("\"))
Dim DllFileName As String = FileName.Replace("\", "")
Me.TextBox2.Text = (DllFileName)
End Sub
