I ran into a similar issue. I believe the button sizes and positions are relative to the windows screen resolution, not the DBP SET DISPLAY MODE command. With the actual windows desktp and DBPro both set for 1024x768, I spaced out and sized a bunch of stuff perfectly, that ran right off the screen when I later switched the windows desktop into 800x600. In normal use of my app, I don't see this as a problem. But if you need a work around, someone posted two functions for me:
Function WinWidth()
local user32 as Integer
local result as Integer
repeat
inc user32
until Dll Exist(user32) = 0
Load Dll "user32.dll", user32
result = Call Dll(user32, "GetSystemMetrics", 0)
Delete Dll user32
EndFunction result
Function WinHeight()
local user32 as Integer
local result as Integer
repeat
inc user32
until Dll Exist(user32) = 0
Load Dll "user32.dll", user32
result = Call Dll(user32, "GetSystemMetrics", 1)
Delete Dll user32
EndFunction result
They return the actual windows desktop resolution. With that, you could try setting the DBPro window to match the windows desktop res. Might work!! What I did was divide my intended DBPro res by windows res and get a scaling factor. Then multiply my intended position of each piece by that scaling factor. It worked but could have been a real pain in the backside if it had been a lot of stuff. Luckily, my form was simple.
The answer to Life, the Universe, and Everything? "Tea for Two". Deep Thought was Dyslexic.