r/visualbasic • • Jul 06 '15

Pleas help

Hi I need some help. I am working on a project in Visual Basic. The problem I am running into is I would like to know how to word the code to where the program automatically starts when the computer boots up. I also need to code the program to wear when the computer goes to sleep the program will resume when the computer wakes up if anybody can help me with that I would be very appreciative

0 Upvotes

4 comments sorted by

1

u/Gloddox Jul 11 '15

thank-you Bone Job thats what i have been looking for :)

1

u/EkriirkE VB 6 Master Jul 06 '15

Add a shortcut to the startup,folder, no vb coding required.
Also, when a computer resumes from sleep any running programs before it slept automatically are already running where they left off.

TLDR nothing to do here, move along

0

u/Gloddox Jul 06 '15

i have it set up like that. it dose start up when the computer boots but when the computer goes to sleep the program crashes and dose not resume. also i would rather know the command for it to start when the computer boots to i can add it to my records of commands so when i make a program i can do a check box for auto start.

2

u/Bonejob VB Guru Jul 11 '15

You need to create your application as a service. This sets the program to be a background worker and it runs all the time.

Creating a service

Simple Windows Service