Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. VB 6 Windows Services running in WinXP Environment

VB 6 Windows Services running in WinXP Environment

Scheduled Pinned Locked Moved Visual Basic
helpworkspacetutorial
6 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    miceisland
    wrote on last edited by
    #1

    Hi, need help, I created a vb6 program that utilized the ntservices component, so that it can run in windows services, i also include a timer control so that the program will run on a specified time, BUT i setup to run at 6am in the morning, PROBLEM my program does not activate on the specified time, is this anything got to do in Windows XP environment, but when i restarted the services, then my program will run. any recommendation on how to troubleshoot this problem, many thanks Michael

    M D 2 Replies Last reply
    0
    • M miceisland

      Hi, need help, I created a vb6 program that utilized the ntservices component, so that it can run in windows services, i also include a timer control so that the program will run on a specified time, BUT i setup to run at 6am in the morning, PROBLEM my program does not activate on the specified time, is this anything got to do in Windows XP environment, but when i restarted the services, then my program will run. any recommendation on how to troubleshoot this problem, many thanks Michael

      M Offline
      M Offline
      miceisland
      wrote on last edited by
      #2

      I have tried to re schedule it at 8am, and it works, but when i schedule it about 6am, it does not work again. hmm any recommendation how to troubleshoot this problem, i was suspecting if its got to do with the power management? Mike

      1 Reply Last reply
      0
      • M miceisland

        Hi, need help, I created a vb6 program that utilized the ntservices component, so that it can run in windows services, i also include a timer control so that the program will run on a specified time, BUT i setup to run at 6am in the morning, PROBLEM my program does not activate on the specified time, is this anything got to do in Windows XP environment, but when i restarted the services, then my program will run. any recommendation on how to troubleshoot this problem, many thanks Michael

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        How are you using the Timer? Are you checking the current time every minute with it or did you sent the Interval to the difference in time between when the service starts and the target time? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        M 1 Reply Last reply
        0
        • D Dave Kreskowiak

          How are you using the Timer? Are you checking the current time every minute with it or did you sent the Interval to the difference in time between when the service starts and the target time? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

          M Offline
          M Offline
          miceisland
          wrote on last edited by
          #4

          Yeah, i was actually checking the time every minute, program actually should run once everyday at 6.00am. if the program checks if 6:00am or greater, then it should run some procedure.

          D 1 Reply Last reply
          0
          • M miceisland

            Yeah, i was actually checking the time every minute, program actually should run once everyday at 6.00am. if the program checks if 6:00am or greater, then it should run some procedure.

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            6 or GREATER??? It sounds like you either don't have a flag, or are not handling the flag properly that says you executed the procedure, so you don't execute it twice in the same day. Do you have conditions that reset that flag in your code? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

            M 1 Reply Last reply
            0
            • D Dave Kreskowiak

              6 or GREATER??? It sounds like you either don't have a flag, or are not handling the flag properly that says you executed the procedure, so you don't execute it twice in the same day. Do you have conditions that reset that flag in your code? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

              M Offline
              M Offline
              miceisland
              wrote on last edited by
              #6

              I have checked the code, you kinda right its something to do with flag property, i think the culprit is the timer control, because once the program executed, i actually set the Timer1.Enabled = False, then forgot to turn it back on after the process has been completed. thanks. hopefully this works.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups