CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    Running Programs at Startup

    I was wondering about how to run programs at startup without simply putting a shortcut to it in the startup on the start menu. Also, is there any way to hide a program from the taskbar and tasklist (when someone presses ctrl + alt + del)? I want a small part of my program to start when windows loads and don't want the user to stop it from starting unless they really know what they are doing and really don't want it to start up and disable it from msconfig.
    Thanks in advance


  2. #2
    Join Date
    Aug 1999
    Location
    US, Florida
    Posts
    817

    Re: Running Programs at Startup

    Sounds like you want to make a Trojen horse program . Well, if you want to start your program everytime windows starts, then you can add it to start menu or registry, also there are few other ways (autoexec, win.ini, etc.)
    About disabling Ctrl+Alt+Del then use this code:
    Following goes into declarations:


    private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (byval uAction as Long, byval uParam as Long, lpvParam as Any, byval fuWinIni as Long) as Long
    private Const SPI_SCREENSAVERRUNNING = 97



    And this are the lines to "hide" from Ctrl+Alt+Del:
    this one to enable:

    Dim ret as Integer
    Dim pOld as Boolean
    ret = SystemParametersInfo(SPI_SCREENSAVERRUNNING, true, pOld, 0)



    And this one to disable:

    Dim ret as Integer
    Dim pOld as Boolean
    ret = SystemParametersInfo(SPI_SCREENSAVERRUNNING, false, pOld, 0)








  3. #3
    Guest

    Re: Running Programs at Startup

    Nope not a Trojan Horse, I have vowed to only use my powers and the knowledge that others have endowed me with for the forces of good. =) Thanks for the reply.


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

Featured