User Tools

Site Tools


using_20supplied_20example_20files

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
using_20supplied_20example_20files [2018/03/31 13:19] – external edit 127.0.0.1using_20supplied_20example_20files [2024/01/05 00:21] (current) – external edit 127.0.0.1
Line 2: Line 2:
  
 //by Richard Russell, August 2007//\\ \\  If you want to utilise, in your own program, any of the example files supplied with //BBC BASIC for Windows// the best way of accessing them is relative to the **@lib$** folder. For example, if you want to customise a toolbar using the file **CDPLAYER.BMP** (which contains button images for Stop, Play, Pause, Rewind and Forward) you can do so as follows:\\ \\  //by Richard Russell, August 2007//\\ \\  If you want to utilise, in your own program, any of the example files supplied with //BBC BASIC for Windows// the best way of accessing them is relative to the **@lib$** folder. For example, if you want to customise a toolbar using the file **CDPLAYER.BMP** (which contains button images for Stop, Play, Pause, Rewind and Forward) you can do so as follows:\\ \\ 
 +<code bb4w>
         ok% = FN_custombuttons(toolbar%, @lib$+"..\EXAMPLES\SOUNDS\CDPLAYER.BMP", \         ok% = FN_custombuttons(toolbar%, @lib$+"..\EXAMPLES\SOUNDS\CDPLAYER.BMP", \
         \                      nbuttons%, buttids%())         \                      nbuttons%, buttids%())
 +</code>
 Note that the specified path locates the EXAMPLES folder relative to the LIB folder. Using this technique you can successfully access the file irrespective of where //BBC BASIC for Windows// is installed on your system, and wherever your program happens to be located.\\ \\  In addition, use of the technique will result in the file(s) being successfully embedded in a compiled executable (see the article [[/Embedding%20resources%20in%20different%20folders|Embedding resources in different folders]]). Note that the specified path locates the EXAMPLES folder relative to the LIB folder. Using this technique you can successfully access the file irrespective of where //BBC BASIC for Windows// is installed on your system, and wherever your program happens to be located.\\ \\  In addition, use of the technique will result in the file(s) being successfully embedded in a compiled executable (see the article [[/Embedding%20resources%20in%20different%20folders|Embedding resources in different folders]]).
using_20supplied_20example_20files.1522502390.txt.gz · Last modified: 2024/01/05 00:16 (external edit)