Hi..
I have problem with SETICON comand,not work for me- what i do wrong.
from help:
QuoteExample usage
hIcon = LOADIMAGE( "c:\\images\\prog.ico", @IMGICON)
SETICON mywindow, hIcon
i use this command many times in CB and there works fine.
I do this :
UINT iconic
iconic = LOADIMAGE("c:\\absmall.ico", @imgicon)
'----------------------------------------------------------------------------------------
OPENWINDOW w1,winL,winT,MeWidth,MeHeight,@caption|@minbox|@maxbox|@size,0,capmain$,&main
SETICON w1,iconicI made icon as usual 16x16 in 256 colors.
so what i do wrong?
Is absmall.ico really in the root directory of your c drive?
LarryMc
*DELETED* @larry sorry didnt read it correctly
this is the from the users guide
hIcon = LOADIMAGE( "c:\\images\\prog.ico", @IMGICON)
SETICON mywindow, hIcon
so that tells me to create a folder called "images" on drive C:\, and save my icon there.
You have to find were you saved your icon and give the full path
SORRY, Code is from EBasic Reference Manual
Regards
hugh
QuoteIs absmall.ico really in the root directory of your c drive?
Yes larry it is on disk C.
I try all posibile combination but still dont work.
What may cose this problem?
Aurel
attach your ico so I can see if it works for me.
Aslo, did you try it with different icon?
LarryMc
Hi Larry here is this small icon 16x16 in 256 colors.
I try many others and dont work,im totaly confused why dont work?
Aurel
I made a little test program and it worked fine for me.
Try this program on your computer.
UINT iconic
iconic = LOADIMAGE("c:\\absmall.ico", @imgicon)
'----------------------------------------------------------------------------------------
capmain$="test"
window w1
OPENWINDOW w1,0,0,100,100,@caption|@minbox|@maxbox|@size,0,capmain$,&main
SETICON w1,iconic
centerwindow w1
int run =1
waituntil run=0
DELETEIMAGE iconic,@imgicon
CLOSEWINDOW w1
end
SUB main
IF @CLASS = @IDCLOSEWINDOW
run=0
ENDIF
RETURN
ENDSUB
LarryMc
Yes it works now ;)
Thanks Larry i dont know that i must use DELETEIMAGE
mean i know that is this proper way but i dont use this in CB.
I forget about roule for releasing resource to system.
So if i want use similiar in ABasic i must find way to releasing resources on exit.
CBasic also has the DELETEIMAGE command.
LarryMc