Read-only archive of the All About Symbian forum (2001–2013) · About this archive

Path to Graphics

1 replies · 2,019 views · Started 09 December 2004

How can I set the path to the location for graphics either for drive c or drive d that it runs when the graphic is located on one of the two drives ?

(e.g. ICON "?:\System\Apps\Calculator\calc.mbm"😉

This is how I do it...


CONST KAppNameShort$="Core"
GLOBAL Path$(255),Drive$(2),Data$(255),MbmFile$(16)
...
MbmFile$=KAppNameShort$+".mbm" : Data$="\System\Apps\"+KAppNameShort$
Foo%=ASC("y"😉
DO
Drive$=UPPER$(CHR$(Foo%))
IF EXIST(Drive$+":"+Data$+MbmFile$)
Path$=Drive$+":"+Data$
BREAK
ENDIF
Foo%=Foo%-1
UNTIL CHR$(Foo%)="Y"
IF Path$=""
ALERT ("Support mbm file not found","Please re-install "+KAppName$)
STOP
ENDIF

And then you know that your graphics are on the drive in Drive$