Attaching a Default Icon to .exe file

1940 pts.
Tags:
Visual Basic
Visual Basic 4
Ok, I know how to change an icon, through the properties tag, but my question is this. How does one attach an icon to a program coded in Visual Basic with a default icon, instead of the one that is always there? Like if I make my own Icon.ico file, how do I make that the default icon for my program? Any help will be greatly appreciated.

Software/Hardware used:
OS is XP

Answer Wiki

Thanks. We'll let you know when a new response is added.

In VB 6 (and I think it should be similar in VB 4) you can achieve that by setting the ‘icon’ property of your startup form to the desired default icon.

Discuss This Question: 13  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TheFinder
    If you read my question, then you'd see that the very first line says I know how to change an icon, that was not my question, the question was how to make an icon the default icon. not change one. Thanks anyways.
    1,940 pointsBadges:
    report
  • Denny Cherry
    If I remember my VB4 correctly (it's been a very long time since I have VB4-6 installed) there should be a way to edit the properties of the project where you can select the default icon for the application.
    66,115 pointsBadges:
    report
  • TheFinder
    Jgunja, I'm not sure what your saying, I've tried to add an Icon to each of the files within my program and none will allow me to do that. Is there some trick to it?
    1,940 pointsBadges:
    report
  • carlosdl
    As I said, this works in VB6, but I'm not sure it will work in VB4. You don't have to add an icon to the files. From the VB IDE, select your startup form (the one that is called when you run the program), and in the properties of the form look for the 'icon' property, and set the appropriate icon.
    69,420 pointsBadges:
    report
  • TheFinder
    Carlosdl Either I just don't understand you or it's not do-a-ble in VB4. but thanks anyways, so this problem is still un-resolved. Anyone else have any ideas?
    1,940 pointsBadges:
    report
  • Vatchy
    First, you need to assign the icon to a form through the form's properties. Then, in the Project properties dialog box go to the MAKE tab and under "Application" you should see Icon. In the icon combo box choose the form to which you assigned the icon. That will then be the default icon for the program.
    1,410 pointsBadges:
    report
  • TheFinder
    Hi Vatchy, Just to see if I understand you, I do this forms properties thing "not in the vb program" correct, but just in windows, find the directory and then the form etc... if this is the case I've tried that and can't do it, It does not give me an option to add an icon to the form through the forums properties.
    1,940 pointsBadges:
    report
  • carlosdl
    No, you do this forms properties thing in the VB IDE.
    69,420 pointsBadges:
    report
  • TheFinder
    Hi Carlosdl, Thanks for your help, I got the first part, I never knew (icon) was in the properties window of VB. thank you. I still don't understand this part "Then, in the Project properties dialog box go to the MAKE tab and under “Application” " where do I find the project properties "Make tab" or Application?
    1,940 pointsBadges:
    report
  • carlosdl
    From the menu bar in VB (File, Edit, View, etc...) select the 'Project' sub-menu, and click on the 'Properties' option. In the project properties window, select the 'Make' tab, and under 'Application' check that the form to which you assigned the icon is selected in the 'icon' dropdown list.
    69,420 pointsBadges:
    report
  • TheFinder
    Thanks Carlosdl, Hay it turns out that VB4 does not have the “Then, in the Project properties dialog box go to the MAKE tab and under “Application” ” tabs, but you still solved my quest, you letting me know that the "icon" thing was in the properties window, I added that to my main form, and when I compiled it, it had the new icon. So dude, thank you, you rock. I give you a thumbs up, literally.
    1,940 pointsBadges:
    report
  • wwolfe
    I am running VB4 (32 bit version) under windows 7 (in compatibility mode). When I try  to assign the  icon property of my start up form (or any form) it is not accepted. Has anyone else had this problem?
    10 pointsBadges:
    report
  • carlosdl
    How does it tell you that "it is not accepted" ?
    69,420 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following