VB Code question

Please forgive me for asking simple questions, I am just getting into programming VB...

I am trying to create a VB program but I am having a tremendous amount of difficulty with it. I keep getting 'Backgroundworker1' is not a member of System.EventArgs

I have searched and nothing I find it helpful to me.

If anyone needs me to attach a zip file containing the source, I can but this is the code I'm using...

Public Class Form1

    Dim sys_running As Integer

    Private Sub BackgroundWorker1_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
        If sys_running = 0 Then
            sys_running = 1
            StartBtn.Text = "Stop"
        ElseIf sys_running = 1 Then
            sys_running = 0
            StartBtn.Text = "Start"
        End If
        Do Until sys_running = 0
            If Keep_Alive.Checked = True Then
            End If
            If Log_Check.Checked = True Then
                'do something here
            End If
            If Kick_Stop.Checked = True Then
                'Kick Stop
            End If
            If Auto_SS.Checked = True Then
            End If

    End Sub

    Private Sub StartBtn_Click(ByVal sender As Object, ByVal e As EventArgs) Handles StartBtn.Click
    End Sub
    Private Sub keepalive()

    End Sub
End Class

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bill PrewIT / Software Engineering ConsultantCommented:
You marked this as VBSCRIPT, but it looks more like VB.net or VBA.  What environment are you working with?

NateAuthor Commented:
That's how new I am, I do not know which... I thought VB was VB....

I am using Visual Studio 2013

When I start "New Project" it says "Visual Basic" and then "Windows Forms Application" with a little "VB" on it.
NateAuthor Commented:
Thank you for your assistance...
CompTIA Security+

Learn the essential functions of CompTIA Security+, which establishes the core knowledge required of any cybersecurity role and leads professionals into intermediate-level cybersecurity jobs.

AndyAinscowFreelance programmer / ConsultantCommented:
Assuming you have a backgroundworker object called BackgroundWorker1 then just changing:
    Private Sub StartBtn_Click(ByVal sender As Object, ByVal e As EventArgs) Handles StartBtn.Click
    End Sub

Open in new window

    Private Sub StartBtn_Click(ByVal sender As Object, ByVal e As EventArgs) Handles StartBtn.Click
    End Sub

Open in new window

should cure your problem

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jacques Bourgeois (James Burger)PresidentCommented:
If you are using Visual Studio, you are using VB.NET. Although it uses the same syntax, this is different from VB6, VBA or VBScript.

Remove the e. in front of e.BackgroundWorker1.

e is a parameter passed to the event. It is useful in some event to get information and pass back information to the system. but is useless in a Click event.

Assuming that your BackgroundWorker is in the same Form as the Button that triggers the Click, simply call you BackgroundWorker without any prefix.

And if I were you, because you are just beginning, I would try to work with simpler objects. The BackgroundWorker is not an easy object to work with.
Éric MoreauSenior .Net ConsultantCommented:
have a look at my article on the BackgroundWorker component: http://emoreau.com/Entries/Articles/2006/12/The-BackgroundWorker-component.aspx
NateAuthor Commented:
Everything I've seen online tells me to use e.backgroundworker, thank you.
AndyAinscowFreelance programmer / ConsultantCommented:
>>Everything I've seen online tells me to use e.backgroundworker

Maybe it was responding to a different event.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.