HelpShell Command

Posts 1–4 of 4 · Page 1 of 1
Shell Command
So, some of you may remember me, I used to be quite good with VB.
I haven't been on it for a while so I'm getting back to grips with it
Anyways, I've got this code for a lag switch but it doesn't seem to work.
I've tried the line in cmd.exe and it works as intended.

Code:
Private Sub Automatic_Tick(sender As System.Object, e As System.EventArgs) Handles Automatic.Tick
        Automatic.Interval = TextBox1.Text
        If Automatic.Enabled = True Then
            Button1.Enabled = False
            Shell("net stop dhcp")
        End If
    End Sub
Idk about your lag switch working problem, but i don't think you need the If statement there, If the timer is ticking it's obviously enabled.
Quote Originally Posted by dudezone2 View Post
Idk about your lag switch working problem, but i don't think you need the If statement there, If the timer is ticking it's obviously enabled.
Woops, that was meant to be under button1
@Golden. You need to run the program (in this case Visual Studio) as administrator or System Error (5) will occur indicating that the access is denied under current privilege.
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?