WindowWidth = 1.5*DisplayWidth 'gange this number, 0.9 1.0 1.1 ...
UpperLeftX=Int((DisplayWidth-WindowWidth)/2)
print UpperLeftX
UpperLeftY=Int((DisplayHeight-WindowHeight)/2)
'nomainwin
open "test" for window as #main
#main "trapclose [quit]"
wait
[quit]
close #main
end
WindowWidth = 300
WindowHeight = 300
stylebits #w, _DS_CENTER, 0, 0, 0
open "test" for dialog_modal as #w
wait
WindowWidth = 0.9*DisplayWidth 'gange this number, 0.9 1.0 1.1 ...
UpperLeftX=Int((DisplayWidth-WindowWidth)/2)
print UpperLeftX
UpperLeftY=Int((DisplayHeight-WindowHeight)/2)
'nomainwin
stylebits #main, _DS_CENTER, _WS_SYSMENU, 0, 0
open "test" for dialog_modal as #main
#main "trapclose [quit]"
wait
[quit]
close #main
end