Page 1 of 1
Posted: Wed Mar 12, 2003 2:25 pm
by BackupUser
Restored from previous forum. Originally posted by CoderLaureate.
What is the range of scope for a label pointer?
For Instance:
File A has a capture image command.
CaptureImage(#ImgNo,?LableWhereImageIs)
If the label (LabelWhereImageIs) is in File B, and I include File A into File B's source, shouldn't this work?
I.E,
File A:
#ImgNo = 1
CaptureImage(#ImgNo,?ImgAddr)
File B:
XInclude "File A"
....
{program code}
....
End
ImgAddr: IncludeBinary "IconImage.Ico"
---------------------------------------------
AMD Duron 950Mhz/Windows XP Pro
Posted: Wed Mar 12, 2003 2:46 pm
by BackupUser
Restored from previous forum. Originally posted by freak.
Does it not work for you?
I just did some testing, and it workes fine here. Are you sure you don't have any other Bug in you Code?
Timo
Posted: Wed Mar 12, 2003 5:14 pm
by BackupUser
Restored from previous forum. Originally posted by CoderLaureate.
Here's a snippet of my code.
Maybe you can spot something I'm missing.
Code: Select all
#Tray_Icon_Img = 1#Tray_Icon = 2
Procedure.l Window_frmServerMainWindow()
If OpenWindow(#Window_frmServerMainWindow,214,40,254,103,#PB_Window_SystemMenu|#PB_Window_Invisible|#PB_Window_ScreenCentered,"SCS-Main Menu")
CatchImage(#Tray_Icon_Img,?TrayIconImg)
AddSysTrayIcon(#Tray_Icon,WindowID(),#Tray_Icon_Img)
SysTrayIconToolTip(#Tray_Icon,"Source Code Server")
If CreateGadgetList(WindowID())
ButtonGadget(#Gadget_frmServerMainWindow_btnUserMgr,65,13,120,20,"User Management",#PB_Button_Left)
ButtonGadget(#Gadget_frmServerMainWindow_btnFileManag,65,38,120,20,"File Management",#PB_Button_Left)
ButtonGadget(#Gadget_frmServerMainWindow_btnServerMan,65,63,120,20,"Server Management",#PB_Button_Left)
HideWindow(#Window_frmServerMainWindow,0)
ProcedureReturn WindowID()
EndIf
EndIf
EndProcedure
And in my main program file (Where this file is XIncluded).
Code: Select all
TrayIconImg: IncludeBinary "BeNetS.Ico"
The Icon image
does exist in the same directory as the program files, and I'm not changing directories anywhere in my code.
I thought about using LoadImage, but I would rather have all my resources included in the EXE (Easier to distribute.)
-Jim
---------------------------------------------
AMD Duron 950Mhz/Windows XP Pro
Posted: Wed Mar 12, 2003 6:08 pm
by BackupUser
Restored from previous forum. Originally posted by CoderLaureate.
Ok.
I just read in the manual that CatchImage only works on BMP files not Icon files. (Perhaps a future update?)
Guess I'm stuck using LoadImage...
---------------------------------------------
AMD Duron 950Mhz/Windows XP Pro
Posted: Wed Mar 12, 2003 7:01 pm
by BackupUser
Restored from previous forum. Originally posted by Berikco.
CatchImage() supports Icons in version 3.60, so just wait a couple of days
Regards,
Berikco
http://www.benny.zeb.be/purebasic.htm
Posted: Wed Mar 12, 2003 9:37 pm
by BackupUser
Restored from previous forum. Originally posted by CoderLaureate.
Awsome!
Can't wait!
-Jim
---------------------------------------------
AMD Duron 950Mhz/Windows XP Pro
http://www.BlueFireStudios.com