WB Icon
WB Icon
I want to use an icon for ma program.
I pointed it with SetWBIcon() function, but when i doubleclic my program I get a message window: "HollywoodPlayer: Wrong arguments specified!".
When I delete that icon then my program starts well.
I pointed it with SetWBIcon() function, but when i doubleclic my program I get a message window: "HollywoodPlayer: Wrong arguments specified!".
When I delete that icon then my program starts well.
Re: WB Icon
Hmm... SetWBIcon (and Application.Icon in MUIRoyale) is only used to set your iconify icon, not the actual program icon.
If you want to have a program icon which you double click to start the program, then it depends a bit in what format your program is. Is it a compiled executable, applet, or plain script file? If it's a compiled program, you just need an icon set as Tool. If it's an applet, then it should be Project icon with the default tool pointing to Hollywood Player. Maybe you're now trying to use a Project icon with a compiled executable and see the error because of that? Open the icon information window and change the icon type to Tool instead of Project.
If you want to have a program icon which you double click to start the program, then it depends a bit in what format your program is. Is it a compiled executable, applet, or plain script file? If it's a compiled program, you just need an icon set as Tool. If it's an applet, then it should be Project icon with the default tool pointing to Hollywood Player. Maybe you're now trying to use a Project icon with a compiled executable and see the error because of that? Open the icon information window and change the icon type to Tool instead of Project.
Re: WB Icon
Of course I know that SetWBIcon() is for setting an appicon. I need both: an icon for my program and an appicon.
I get an icon from Aminet and I want it to be my program's icon and an appicon as well.
My program is a compiled executable, and the icon is of Tool type of course.
I get an icon from Aminet and I want it to be my program's icon and an appicon as well.
My program is a compiled executable, and the icon is of Tool type of course.
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: WB Icon
Maybe you're using some tooltypes that conflict with Hollywood's arguments? What tooltypes have you set in your program's icon?
Re: WB Icon
No tooltypes set at all.
See the http://ramdisk.net.pl/t/daysleeper0.png.
See the http://ramdisk.net.pl/t/daysleeper0.png.
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: WB Icon
Hmm, it is a NewIcon... AFAIR the NewIcon format abuses tooltypes to store certain image information. Please upload the icon somewhere so I can check what's wrong there.
Re: WB Icon
http://ramdisk.net.pl/t/Daysleeper.info
Btw, you're right. I have replaced the icon with a PNG one and it solved the problem. I'm pleased with it, but there is a little bitter aftertaste at the end. I prefer NewIcons - the two state glow ones. I don't like PNG. Is there a solution?
Btw, you're right. I have replaced the icon with a PNG one and it solved the problem. I'm pleased with it, but there is a little bitter aftertaste at the end. I prefer NewIcons - the two state glow ones. I don't like PNG. Is there a solution?
Re: WB Icon
Btw2, the SetWBIcon woun't work HERE.
I do like this:
I also tried without full path:
I tried with both: glow and PNG icons.
Does SetWBIcon() return anything to check wheather or not it exits succesfully?
I do like this:
Code: Select all
appicon$ = AddStr(GetCurrentDirectory(), "/Daysleeper2.info")
SetWBIcon(appicon$)
SetWBIcon(appicon$, #AMIGAICON_SHOW)
Code: Select all
SetWBIcon("Daysleeper2.info")
SetWBIcon("Daysleeper2.info", #AMIGAICON_SHOW)
Does SetWBIcon() return anything to check wheather or not it exits succesfully?
Re: WB Icon
Can it be the SetWBIcon is ignored here at all?
I did like this SetWBIcon(appicon$, #AMIGAICON_SETTITLE) on purpose. I know #AMIGAICON_SETTITLE requires following parameter. The compiler didn't claimed it. The executable caused no error requesters.
Cubic IDE doesn't colorize this function. It made me thinking that (for some reaseon) it's ignored at all.
I did like this SetWBIcon(appicon$, #AMIGAICON_SETTITLE) on purpose. I know #AMIGAICON_SETTITLE requires following parameter. The compiler didn't claimed it. The executable caused no error requesters.
Cubic IDE doesn't colorize this function. It made me thinking that (for some reaseon) it's ignored at all.
Re: WB Icon
It was a MUI program? You'll have to use MUI functions to set the icon then. Put icon="Daysleeper2.info" in your <application> line in the xml file. See the docs here.
BTW. you also should use FullPath when constructing directory strings.
So replace AddStr(GetCurrentDirectory(), "/Daysleeper2.info") with FullPath(GetCurrentDirectory(), "Daysleeper2.info") if you still happen to need that kind of stuff somewhere. With AddStr you may end up with paths like "Ram Disk:/Daysleeper2.info" which might not work because of / after :.
BTW. you also should use FullPath when constructing directory strings.
So replace AddStr(GetCurrentDirectory(), "/Daysleeper2.info") with FullPath(GetCurrentDirectory(), "Daysleeper2.info") if you still happen to need that kind of stuff somewhere. With AddStr you may end up with paths like "Ram Disk:/Daysleeper2.info" which might not work because of / after :.