hello
Here is lil code from WFS to make your window stay on top of other windows centered !
hope this helps
1. I your App make a method Called BringToCenter
Sub BringToCenter( w as Window, assigns set as Boolean )
#if TargetWin32
Const SWP_NOSIZE = &H1
Const SWP_NOMOVE = &H2
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Declare Function SetWindowPos Lib "user32" (hwnd as Integer, hWndInstertAfter as Integer, _
x as Integer, y as Integer, cx as Integer, cy as Integer, flags as Integer) as Integer
dim after as Integer
if set then
after = HWND_TOPMOST
else
after = HWND_NOTOPMOST
end
Call SetWindowPos( w.handle, after, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE )
w.Left=(Screen(0).AvailableWidth -w.Width)/2
w.Top=(Screen(0).AvailableHeight -w.Height)/2
#endif
2. Call it like this in windows open event
App.BringTOCenter( Self ) = True