You need to find the size of the client area of the dbpro window and size the interface to it.
If you don't need it too accurite you can use DBP WINDOW WIDTH() and DBP WINDOW HEIGHT(). Those commands don't take account for the border and title bar so if you size an interface to them it will be a little too big.
If you want it exact use something like this.
disable escapekey
set window title "test"
setup gui "test","Init code here"
global _panel as integer
_panel = free gadget()
create gadget panel _panel,0
set gadget _panel,0,0,dbp window width(),dbp window height()
load dll "user32.dll",1
hwnd = call dll(1,"GetActiveWindow")
make memblock 1,16
last = timer()
delay = 250
size(hwnd)
repeat
if timer() - last > delay
size(hwnd)
last = timer()
endif
until escapekey()
delete dll 1
end
function size(hwnd)
`get the size of the client area of the dbpro window and size the panel to it
call dll 1,"GetClientRect",hwnd,get memblock ptr(1)
width = memblock word(1,8) - memblock word(1,0)
height = memblock word(1,12) - memblock word(1,4)
set gadget _panel,0,0,width,height
endfunction
remstart
Api function documentation
GetActiveWindow
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputfunctions/getactivewindow.asp
GetClientRect
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/getclientrect.asp
remend

it's cool to hate