General discussion

Locked

VB 6: Icon on formless application

By TxITGuy ·
I have written a small application to autoplay from a CD-ROM. It checks for the existance of Internet Explorer on the computer, and if it finds it, opens a web site in it. Execution starts in sub Main(), and the application doesn't have a form.
I drew a custom icon that I want to use for this application, but I can't figure out how to tell VB to use it. It currently resides at ID 1 in a resource file, that is included in the project. I have also tried assigning it to a variable using:

Icon = LoadResPicture(1,vbResIcon)

No matter what I try, the icon never shows up on the Make tab. How do you assign an icon to a formless application?
Ben

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

VB 6: Icon on formless application

by donaldsimpson.co.uk In reply to VB 6: Icon on formless ap ...

Hi,

I don't have VB on this machine, but am pretty sure you can set the Icon on the Properties Section for the project, and it will be used by the .exe when you make it.
What version are you using?

Donald

Collapse -

VB 6: Icon on formless application

by TxITGuy In reply to VB 6: Icon on formless ap ...

Version 6. Thanks, but Peyison's suggestion worked. By the way, the Make tab is part of the Project's property dialog. Thanks anyway.
Ben

Collapse -

VB 6: Icon on formless application

by Peyison In reply to VB 6: Icon on formless ap ...

Ben,

What about including a blank form in your app? You never have to load it so it will never have to be seen, but you'd be able to use its icon in the Make tab.

Collapse -

VB 6: Icon on formless application

by TxITGuy In reply to VB 6: Icon on formless ap ...

Thanks, it worked. You'd think that MS would have made another way, I guess they figured an app only needed a custom icon if it had a visible element.
Ben

Collapse -

VB 6: Icon on formless application

by TxITGuy In reply to VB 6: Icon on formless ap ...

This question was closed by the author

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums