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

using_20supplied_20example_20files [2018/03/31 13:19]
127.0.0.1 external edit
using_20supplied_20example_20files [2018/04/17 19:22] (current)
tbest3112 Added syntax highlighting
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.txt ยท Last modified: 2018/04/17 19:22 by tbest3112