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

    How to add program Icon to desktop and starup menu?

    Hello,

    I want to add my program icon to desktop or starup manu when i install it. Please tell me How to? Thank your for any help!




  2. #2
    Join Date
    Feb 2000
    Location
    Kansas
    Posts
    49

    Re: How to add program Icon to desktop and starup menu?

    All you have to do is go through the package and deployment wizard and deploy it (after you package it). There is a screen that will let you pick where in the start menu you want to put the shortcut.

    As far as adding the icon to it, you just have to pick an icon for the project with the icon property of the main form your working with. (typically i set all my forms to the same icon).




  3. #3
    Join Date
    Jan 2000
    Posts
    45

    Re: How to add program Icon to desktop and starup menu?

    you could:
    filecopy app.path & "\whatever.ico", "c:\C:\WINDOWS\All Users\Desktop\whatever.ico"

    for that to work you have to have that icon in the same directory as the .exe file. if you want to add to the start menu:

    mkdir "C:\WINDOWS\Start Menu\Programs\CoMpAnY NaMe"
    filecopy app.path & "\whatever.ico", "C:\WINDOWS\Start Menu\Programs\CoMpAnY NaMe\whatever.ico"

    if you dont no where the person downloaded the file to ask the codeguro thing how to search for a certain file.


  4. #4
    Join Date
    Jan 2000
    Posts
    45

    Re: How to add program Icon to desktop and starup menu?

    if you dont have a icon maker click this link:
    http://www.impactsoft.com/muangelo/download/mike98b.exe



  5. #5
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: How to add program Icon to desktop and starup menu?

    Hmm, it just got to me that it looks like that the icons realy have to do something. The way you describe it will actually place an icon on the desktop and start menu, but wouldn't it be nice that when you press the icon, the application lauches?

    Try this


    'declare in module
    private Declare Function fCreateShellLink Lib "vb5stkit.dll" (byval Forder as string, byval ShortCutName as string, byval ExePath as string, byval Params as string) as Long

    'anywere in project
    Dim retVal as Long
    retVal = fCreateShellLink("..\..\Desktop", "MyName", "c:\myApp\myApp.exe", "")



    this should normally create a shotcut on the desktop, the icon will be the one from the file reffered to. It will have the name MyName.
    In the code above, the link on the desktop called MyApp, refers to the file c:\myApp\myApp.exe

    Tom Cannaerts
    [email protected]

    The best way to escape a problem, is to solve it.
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

  6. #6
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: How to add program Icon to desktop and starup menu?

    If you are creating an installation setup for your program (and you should be!) using PDW / Installshield etc, you *should* have a link created automatically for you in the folder/menu that you specify.

    To add a desktop shortcut to your program (or a shortcut from anywhere else), you can use the Windows Scripting Host (WSHOM.OCX - comes with VB6 or downloadable from http://msdn.microsoft.com) to create shortcuts for you. Take a look at this link :

    http://codeguru.developer.com/vb/articles/1923.shtml

    - that shows how to use the WSH to create desktop shortcuts and gives full access to their properties.



    Chris Eastwood

    CodeGuru - the website for developers
    http://codeguru.developer.com/vb

  7. #7
    Guest

    Re: How to add program Icon to desktop and starup menu?

    Hello,

    What is PDW/Installshield? And in the article:

    http://codeguru.developer.com/vb/articles/1923.shtml

    It needs to run the program to create shortcut to desktop. How to make it create shortcut when installs the program? Thank you for your help!!



  8. #8
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: How to add program Icon to desktop and starup menu?

    PDW stands for 'Package and Deployment Wizard'. This is a utility program that comes with VB6 (it's called Setup Wizard in VB5). This program will create a 'setup' installation for your VB program including the relevant run-time DLL's and Controls. Installshield is a 3rd party program similar to PDW that offers more control over the installation process.


    Look under: Start->Programs->Microsoft Visual Studio->Microsoft Visual Studio 6->Tools

    If you don't use a setup program (eg. PDW, or Installshield) when installing your software onto other computers, you're just asking for all kinds of trouble.



    Chris Eastwood

    CodeGuru - the website for developers
    http://codeguru.developer.com/vb

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