943,509 Members | Top Members by Rank

Ad:
You are currently viewing page 1 of this multi-page discussion thread
Feb 14th, 2003
1

Icons

Expand Post »
I'm using Visual Basic 6.0 Learning Edition. Does anyone know how to set an Icon for my program (other than the default)? When I click the '...' and then choose an Icon, it claim's I have 'set an Invalid property value'. Can anyone help with this?
Similar Threads
Team Colleague
Reputation Points: 63
Solved Threads: 6
Supreme Evil Overlord
Roberdin is offline Offline
282 posts
since Feb 2003
Feb 14th, 2003
0
Re: Icons
I used to use VB6 for years but now I only have Visual Studio.NET installed, so it's hard for me to remember back and picture what you're seeing.

As far as an icon, you're talking about the little icon that shows up on the top left of the title bar of the application window, right?

Are you sure that you're choosing something that, indeed, is an icon? (sorry, but I just had to ask that one)

The only other thing I can remember (and my experience with VB6 has been nonexistent for years already) is that if you want to put an icon on a command button, even after you choose the icon you want, nothing will change, until you set its style attribute to "graphical".

I'm sure this doesn't apply to application icons though. (Just for the heck of it, I just set up an icon in a Visual Basic.NET application with no problems, and I don't remember having any problems with VB6 either?)

Would you maybe be able to send a screenshot? Or provide some more detailed info ... this is a bit boggling, *IF* we're talking about the same thing!
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 162
The Queen of DaniWeb
cscgal is offline Offline
13,645 posts
since Feb 2002
Feb 14th, 2003
0
Re: Icons
Ok...

Right, I have a .ico file. I want to put this as the program's taskbar icon.
Team Colleague
Reputation Points: 63
Solved Threads: 6
Supreme Evil Overlord
Roberdin is offline Offline
282 posts
since Feb 2003
Feb 14th, 2003
0
Re: Icons
Well, the taskbar icon is the same as the icon I was talking about ... it just goes to the taskbar when the program is minimized.

I don't understand why this doesn't work. Are you sure you're in the right property field? Do you have a screenshot or ... ?
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 162
The Queen of DaniWeb
cscgal is offline Offline
13,645 posts
since Feb 2002
Feb 14th, 2003
0
Re: Icons
I'm choosing the Icon property.
Team Colleague
Reputation Points: 63
Solved Threads: 6
Supreme Evil Overlord
Roberdin is offline Offline
282 posts
since Feb 2003
Feb 14th, 2003
0
Re: Icons
What if you tried doing it as a typed command? e.g., on form load, do myForm.icon = myIcon.ico or something along those lines

at least for now, to debug?
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 162
The Queen of DaniWeb
cscgal is offline Offline
13,645 posts
since Feb 2002
Feb 15th, 2003
1
Re: Icons
I've had this problem in the past with Visual Basic 5. It's a pain. It was with an icon I created. When I tried another icon, one that came with Visual Basic, it worked fine. Try using another icon and see what happens. I get the feeling that even if you set the icon at runtime, you will get the same error (at least I did). Send me the icon, let me try it on my machine.

If you want to load an icon at runtime, you can try something like this in your form_load():

Form1.Icon = LoadPicture("c:\x.ico")

or wherever you icon is. Let me know how it goes. My e-mail address is in my profile.
Team Colleague
Reputation Points: 262
Solved Threads: 18
a.k.a inscissor
samaru is offline Offline
1,227 posts
since Feb 2002
Feb 15th, 2003
0
Re: Icons
Cool! Thanks, I'll try that.
Team Colleague
Reputation Points: 63
Solved Threads: 6
Supreme Evil Overlord
Roberdin is offline Offline
282 posts
since Feb 2003
Feb 15th, 2003
0
Re: Icons
"Compile Error: Type Mismatch"

Agh!
Team Colleague
Reputation Points: 63
Solved Threads: 6
Supreme Evil Overlord
Roberdin is offline Offline
282 posts
since Feb 2003
Feb 15th, 2003
0
Re: Icons
The code works for me. Send me the icon.
Team Colleague
Reputation Points: 262
Solved Threads: 18
a.k.a inscissor
samaru is offline Offline
1,227 posts
since Feb 2002

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
This thread is currently closed and is not accepting any new replies.
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: VB/word 2000/template forms
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: I NEED HELP! -- How to incorporate an .exe to a vbp?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC