I got it Here is how to do it in Windows, I think :
Create two different windows which have the same size and bear the same controls and code :
One regular window
One borderless window
Activating the “Lock window” renders invisible the regular window and reveals the borderless at the same place. Unactivating “Lock window” comes back to the regular window and makes invisible the borderless.
All depends on the complexity of your window UI for the actual coding, but it can work.
I use a window with the type set in the IDE to Plain Box and set the width, Min. Width and Max. Width to the same value just as i do with the Height, Min. Height and Max. Height.
If you don’t want a menubar in the window set the Menu Bar to None. Because then there is no way to close the window you have to implement an event for closing e.g. Mousedown or put a close button on the window.
The first ( hwnd ) parameter is the problem, it accepts it as integer, rather than ptr…
[code]Declare Sub SetWindowPos Lib "User32" ( hwnd as Integer, after as Integer, x as Integer, y as Integer, width as Integer, height as Integer, flags as Integer )
Const SWP_NOMOVE = &h2
SetWindowPos( me.handle, 0, 0, 0, Me.Width, Me.Height, SWP_NOMOVE )
[quote=68517:@Ramon SASTRE]This code in the Moved event of the window prevents its movement and it’s cross platform.
[code]static top, left as integer
if top = 0 then top = self.top
if left = 0 then left = self.left
self.top = top
self.left = left[/code][/quote]
This works fine, only i would also disable resizeable, minimize and maximize button in the IDE.
Especially the minimize button can cause problems when restoring the window and leading to a crash of the program, as i discoverd while trying your solution.