Results 1 to 8 of 8

Thread: Screenshots? Moving Files? Make program start with windows?

  1. #1

    Thread Starter
    Addicted Member Smie's Avatar
    Join Date
    Jun 1999
    Location
    Columbus, OH
    Posts
    249

    Question

    I would like to have my program, when ran for the first time, move itself to a certain folder (ex. C:\myprog\) and make it so it starts when windows starts, how would i go about doing this?

    Also, how would I make my project, with just a click of a button, take a screen shot, and automatically save it (sshot.jpg ect.) Any Clue?


    I would really appreciate the help on this one, thank you very much!

  2. #2
    New Member
    Join Date
    Jul 2000
    Location
    Belguim
    Posts
    15

    DLL

    <advert deleted - James>

    [Edited by James on 09-05-2000 at 05:11 AM]

  3. #3
    Guest
    To create a shortcut:

    Code:
    'In Visual Basic 5.0, change Stkit432.dll in the following
    'statement to Vb5stkit.dll.  Stkit432.dll is for Visual Basic 4.0
    
    Private Declare Function fCreateShellLink Lib "STKIT432.DLL" (ByVal
    lpstrFolderName As String, ByVal lpstrLinkName As String, ByVal lpstrLinkPath As
    String, ByVal lpstrLinkArgs As String) As Long
    
    Dim Short As Long
    Short = fCreateShellLink("\Startup", _
    "Myprog", "c:\myprog\myprog.exe", "")

  4. #4

    Thread Starter
    Addicted Member Smie's Avatar
    Join Date
    Jun 1999
    Location
    Columbus, OH
    Posts
    249
    thanks matt, and how would i remove it from startup?

    thanks a bunch!

  5. #5
    Guest
    Use the Kill statement.

    Code:
    Kill ("C:\WINDOWS\Start Menu\Programs\StartUp\myprog.lnk")

  6. #6
    Addicted Member
    Join Date
    Aug 2000
    Location
    At my computer
    Posts
    187

    Arrow Screen capture code

    I have code which captures the screen, but it can only save as a bitmap (not jpg), with the SavePicture statement.

    If you are still interested, let me know.

  7. #7
    Guest
    To make your program start when Windows does, add the following entry to the Registry:

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\. For the Value you would enter your Application name (i.e MyApp) and for the Data, you would enter the path to it, i.e C:\MyApp.exe.

  8. #8
    Hyperactive Member dsy5's Avatar
    Join Date
    Jul 2000
    Location
    Lockport, NY
    Posts
    362
    Originally posted by Megatron
    To make your program start when Windows does, add the following entry to the Registry:

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\. For the Value you would enter your Application name (i.e MyApp) and for the Data, you would enter the path to it, i.e C:\MyApp.exe.
    I've not seen it done this way, Megatron. Perhaps you
    forgot to put Run after CurrentVersion?

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\.
    Donald Sy - VB (ab)user

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