Results 1 to 3 of 3

Thread: Auto start

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2001
    Location
    Minnesota
    Posts
    91

    Auto start

    i have an address book that i want to load everytime i start my PC (i dont want to see it in the system tray however). So i just sits silenty running in the background unseen unheard how can i do that???

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Jul 2001
    Location
    Minnesota
    Posts
    91
    wait will just putting it in the windows start folder do it??? if that does it haha awesome i am a dumbass but is there a way u can add it using code and have the app be in like My Documents??

  3. #3
    Fanatic Member
    Join Date
    Nov 2000
    Location
    Sydney Australia
    Posts
    804
    This gets the path to documents, then just add a file here to add to start-->documents.

    VB Code:
    1. Option Explicit
    2.  
    3. Private Declare Function SHGetFolderPath Lib "shfolder" Alias "SHGetFolderPathA" (ByVal hwndOwner As Long, ByVal nFolder As Long, ByVal hToken As Long, ByVal dwFlags As Long, ByVal pszPath As String) As Long
    4. Private Const CSIDL_RECENT As Long = &H8 ' <user name>\Recent
    5.  
    6.  
    7. Private Sub Command1_Click()
    8. MsgBox RetrievePath(CSIDL_RECENT)
    9. End Sub
    10.  
    11.  
    12. Private Function RetrievePath(ByVal SpecialFolder$)
    13. Dim Path$
    14.  
    15. Path = String(260, 0)
    16. 'Path must have a length, and 260 is large enough to contain any path
    17.  
    18. SHGetFolderPath 0, SpecialFolder, 0, 0, Path
    19.  
    20. RetrievePath = Path
    21. 'The path variable will now hold the path to the history folder for the current user.
    22.  
    23. End Function

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