Results 1 to 13 of 13

Thread: Please help me.

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2002
    Posts
    21

    Please help me.

    If I want to run my application automatic when the windows starts.
    (like the clock,volume....)

    But I don't to use API.
    How could I do?

    Thanks.....

  2. #2
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724
    Choices:
    1. Place an entry (String) in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run. e.g. MyApp with value being the path to your application
    2. Place a shortcut to your application in the startup folder.

  3. #3
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176
    Dam Right!!!!

  4. #4
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724
    Originally posted by BodwadUK
    Dam Right!!!!
    And that means?

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Sep 2002
    Posts
    21
    But , how could I code the program?

    I don't want to set it by human.....

    I mean the application can set the function by itself.

  6. #6
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176
    Thats How You Do It Copy A ShortCut into The Startup Folder Under Start/Programs

    Code It As Normal

    Itself???

  7. #7
    Member
    Join Date
    Oct 2002
    Location
    la la la you can't see me
    Posts
    46
    do u mean like installing it?
    What does "formatting drive C..." mean?!

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Sep 2002
    Posts
    21
    Thank everyone.

    I am ok!

  9. #9

    Thread Starter
    Junior Member
    Join Date
    Sep 2002
    Posts
    21
    Could you tell me what is shortcut?

  10. #10

    Thread Starter
    Junior Member
    Join Date
    Sep 2002
    Posts
    21
    Mr.axion_sa:

    Could you explain your method detailed?

    Thank you very much....

    If someone know how to do the method,
    please help me , I don't know how to do .....

    Thanks...........

  11. #11
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724
    The code I'd use if VB6 was used:
    VB Code:
    1. Private Declare Function fCreateShellLink Lib "VB5STKIT.DLL" (ByVal lpstrFolderName As String, ByVal lpstrLinkName As String, ByVal lpstrLinkPath As String, ByVal lpstrLinkArgs As String) As Long
    2. Private Sub Form_Load()
    3.     'KPD-Team 1999
    4.     'URL: [url]http://www.allapi.net/[/url]
    5.     'E-Mail: [email][email protected][/email]
    6.     ' -> code by Raist Lin
    7.     'Create a shell link on your desktop
    8.     lngresult = fCreateShellLink("..\..\Desktop", "LINK", "C:\myfile.exe", "")
    9. End Sub

    But, you're using .Net - there should be a .Net equivalent hiding somewhere

  12. #12
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    errr, if you are using the registry then I see no reason to aviod API's (how can you do this with an API?)

    umm if you want to do what axion_sa said:

    VB Code:
    1. Imports Microsoft.Win32
    2.     Private Sub AddToRun(ByVal appPath As String, ByVal appTitle As String)
    3.         ' I used CreateSubKey instead of OpenSubKey. It looks like that not all machines have a Run folder :D
    4.         Dim regRun As RegistryKey = Registry.CurrentUser.CreateSubKey("Software\Microsoft\Windows\CurrentVersion\Run")
    5.         regRun.SetValue(appTitle, appPath)  
    6.         regRun.Close()
    7.     End Sub


    This will add the key to that part of the registry, but I havent tested to see if it works... so you call it like this


    AddToRun (APPLICATION'S EXECUTABLE PATH, "My Application Title!")
    Last edited by MrPolite; Oct 16th, 2002 at 01:22 AM.
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  13. #13

    Thread Starter
    Junior Member
    Join Date
    Sep 2002
    Posts
    21
    Thank all of the people who help me....
    I am successful.
    My English is very bad, because I am not a American.
    Now I share my method.

    I use a method about registry.
    when I make a Windows Installer
    then you can set the registry.

    just set the
    "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run" and your application infromation about regetry

    (it is on the left of screen)


    Thanks everyone again!
    Attached Images Attached Images  

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