ExclamationHelpFirst VB '10 Injector

Posts 1–3 of 3 · Page 1 of 1
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)

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
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
You don't have a button to browse or it's not named "Button1"
If you use a theme i think is like HfxButton1
my code is :
OpenFileDialog1.Filter = "DLL|*.dll"
OpenFileDialog1.ShowDialog()
Dim FileName As String
FileName = OpenFileDialog1.FileName.Substring(OpenFileDialog1 .FileName.LastIndexOf("\"))
Dim DllFileName As String = FileName.Replace("\", "")
Me.Dlls.Items.Add(DllFileName)
so i dont see error Try to rename the button " Button1 "
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us