Here's a snippet to demonstrate how you can have a Windows Explorer view in your app. You can scroll and browse folders.
It's lifted directly from my FTP client, minus fancy things like XP scrollbars and file icons
DBPro, it should work in 1.13, but not tested.
rem Windows Explorer in DBPro
rem by David89 - Jan 2003
rem Feel free to use but a credit would be nice!
rem -----------------------------------------
rem Dim arrays
Dim PCShown$(28)
Dim PCShown(28)
rem Setup sys
sync on
sync rate 20 : ` deliberately low
set text font "Verdana"
MaxVisible = 20 : `max number of files visible
White = rgb(255,255,255)
FolderColour = RGB(230,115,0)
Blue = rgb(0,0,200)
DownImg = 1
UpImg = 2
rem Generate images
cls blue
ink white,0
line 0,0,5,10
line 5,10,10,0
get image Downimg,0,0,10,10
cls blue
ink white,0
line 0,10,5,0
line 5,0,10,10
get image UpImg,0,0,10,10
cls
rem Main loop
do
cls
goSub ShowPCFiles
goSub CheckPCClicks
rem Mouse clickin
if mouseclick()=0 then down = 0
sync
loop
rem PERFORM CEHCKLIST FOR FILES AND EXTRACT INFORMATION
rem -------------------------------------------------------------------------------
ShowPCFiles:
perform checklist for files
numoffiles = checklist quantity()
rem Get excess number of files (not shown)
If NumOfFiles > MaxVisible then endbit = MaxVisible else endbit = NumOfFiles
if endbit = MaxVisible then Excess = NumOfFiles - MaxVisible
If NumOfFiles = 0 then return
rem Show Scrollbar
UpX = 302
UpY = 6
UpX2 = UpX+13
UpY2 = UpY+14
DOWNX = 302
DOWNY = 365
DOWNX2 = DOWNX+13
DOWNY2 = DOWNY+14
paste image Upimg,302,6
paste image Downimg,302,365
rem Scroll through list
If MouseOverArea(downx,downy,downx2,downy2)=1 and mouseclick()=1 then inc PCOffset
If MouseOverArea(upx,upy,upx2,upy2)=1 and mouseclick()=1 then dec PCOffset
If PCOffset > Excess then PCoffset = Excess
If PCOffset = -1 then PCOffset = 0
rem Set text display settings
set text size 12
set text to normal
ink white,0
rem Set starting height
y = 10
i = 0
rem Get files from HD and show
for f = 1+PCOffset to Endbit+PCOffset
inc i
name$ = checklist string$(f)
filetype = checklist value a(f)
rem Get file type
if filetype = 1 then ink Foldercolour,0 else ink white,0
rem Add the "visible" index
PCShown$(i) = name$
PCShown(i) = filetype
rem Show file
text 25,y,name$
inc y,13
next f
return
rem ACCESS INFO STORED IN ARRAY BY SUB ABOVE AND CHECK IF WE ARE CLICKING ON ENTRY
rem -------------------------------------------------------------------------------
CheckPCClicks:
rem Set starting height
y = 10
i = 0
if NumOfFiles > MaxVisible then Endbit = MaxVisible else Endbit = NumOfFiles
rem Get files from HD and show
for f = 1 to Endbit
inc i
name$ = PCShown$(i)
filetype = PCShown(i)
rem Define mouseover area
x = 10
y = y
x2 = 300
y2 = y+12
rem Get file type
if filetype = 1 then ink Foldercolour,0 else ink white,0
Over = MouseOverArea(x,y,x2,y2)
If Over = 1 then LineBox(x,y,x2,y2)
If Over = 1 and MouseClick()=1 and down = 0 and FileType = 1 then set dir get dir$()+"/"+name$ : pcoffset = 0 : down=1
If Over = 1 then selectedPC$ = name$
inc y,13
next f
return
Function MouseOverArea(x1,y1,x2,y2)
if mousex() > x1 and mousey() > y1 and mousex()
http://www.aozf28.dsl.pipex.com/rgt_xmas_banner.gif[/img]
Merry Christmas to all Apollo members!
Visit [url]www.lightning-systems.co.uk[/url] :: [url]www.realgametools.net/forums[/url]