It's been a few years since I've messed with DBP. Anyone figure out the preview window problem. I ran across a post by Jess T with this code
`Set up for getting Saver info
command As String
parent As String
command = CL$()
parent = Right$(command,Len(command) - 3)
command = Lower$(Left$(command,2))
If command = "/c" Or command = ""
EndIf
If command = "/s"
_normal()
EndIf
If command = "/p"
_ScreenSaver_preview(Val(parent))
EndIf
autocam off
sync on : sync rate 60
`Main Loop
while (MouseMoveX() = 0) And (MouseMoveY() = 0) And (MouseMoveZ() = 0) And (ScanCode() = 0)
`Do stuff
Cls
Text 0,0,"Hello WOrld"
sync
endwhile
Function _normal()
`=== Set Resolution =======================================
If Check Display Mode(1024,768,32) = 1 Then Set Display Mode 1024,768,32
EndFunction
Function _ScreenSaver_preview(parent As DWord)
Local user32 As Integer
Local Hwnd As DWord
Local temp As DWord
Local x As Integer
Local y As Integer
Local memnum As Integer
Set Window On
Set Window Layout 0,0,0
user32 = 1
memnum = 1
Load DLL "user32.dll",1
Hwnd = Call DLL(1,"GetActiveWindow")
temp = Call DLL(1,"SetParent",Hwnd,parent)
Make Memblock memnum,20
Call Dll user32,"GetWindowRect",parent,Get Memblock Ptr(memnum)
`memblock word(1,0) = left
`memblock word(1,4) = top
`memblock word(1,8) = right
`memblock word(1,12) = bottom
x = MemBlock DWord(memnum,0)
y = MemBlock DWord(memnum,4)
Set Display Mode 153,113,32
Call DLL user32,"MoveWindow",x,y,153,113,1
EndFunction
I'm guessing the code is out of date. When I loaded it up and ran it,everything worked,just not the way it's supposed to. Simply put,this is what I got.
command As String
`parent As String
command = CL$()
command = Lower$(Left$(command,2))
If command = "/c" Or command = ""
EndIf
If command = "/s"
set display mode 800,600,16
EndIf
If command = "/p"
end
EndIf
autocam off
sync on : sync rate 60
`Main Loop
while (MouseMoveX() = 0) And (MouseMoveY() = 0) And (ScanCode() = 0)
Cls
Text 0,0,"Hello WOrld"
sync
ENDWHILE
Any help with the preview would be apreciated,if not I can live with this.