Results 1 to 5 of 5

Thread: Upon Shutting Down

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Nitro
    Posts
    633

    Question

    Does anyone know how to run a certain program, when SHUTTING down from WINDOWS?

    Can you do it through the registry or with codes?

    Thanks!
    Chemically Formulated As:
    Dr. Nitro

  2. #2
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    Rotterdam, Netherlands
    Posts
    386
    Not sure about the registry, but if you have a program running, you can catch the form_queryunload event to find out why your program is quitting, one of the options is that windows is shutting down. Do what you want to do then :-)
    Hope this helps

    Crazy D

  3. #3
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Put and application to run att startup with
    Code:
    Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
        If UnloadMode = vbAppWindows Then
            Shell "C:\yourapppath\yourapp.exe", vbNormalFocus
        End If
    End Sub
    and it will run your file at shutdown. I'm not sure but you can not allow threading in that app or the shutdown operation will hang up until you get an End task window. You could of course cancel the operation and restart it later
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Nitro
    Posts
    633

    Thanks CrazyD and Kedaman!

    I think that is what I am looking for Kedaman.

    Thanks Kedaman!
    Chemically Formulated As:
    Dr. Nitro

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Nitro
    Posts
    633

    Thumbs up

    Yep, that is what I was looking for Kedaman. Thanks.
    Chemically Formulated As:
    Dr. Nitro

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width