I made a program to shutdown my computer. It has two buttons, one to shut it down, the other to exit the program.
When I run it out of visual basic, everything runs fine. When I compile it, it spawns a random button which, when clicked, opens another copy of the program (shutdown.exe) and then halts.
Here is the code used on the shutdown button:
Is this my dodgey copy of VB or an error?
Maybe someone else could compile for me?
When I run it out of visual basic, everything runs fine. When I compile it, it spawns a random button which, when clicked, opens another copy of the program (shutdown.exe) and then halts.
Here is the code used on the shutdown button:
Code:
Private Sub Picture1_Click(Index As Integer)
'Shutdown the computer
Shell ("shutdown.exe -s")
End Sub
Is this my dodgey copy of VB or an error?
Maybe someone else could compile for me?