Feedback #40171: Plain box window in Windows 10 has a white stripe on top

[quote]Summary: Plain box window in Windows 10 has a white stripe on top
Link: <https://xojo.com/issue/40171>

User “William Yu” has updated case #40171.

The following comments were left:

»»Status changed from ‘Verified’ to ‘Closed (By Design)’.
»»Report closed. This case was not ranked.

This case has been closed because the behavior described is not a bug. You can either create a plain box that’s not resizable to remove the white stripe, or implement the workaround described here: winapi - Create window without titlebar, with resizable border and without bogus 6px white stripe - Stack Overflow

Yet another nail in the cross platform promise. After the loss of transparency, now the plain box that is not by design.

It is all about consistency between platforms.

If I start a project on Mac, plain box is what the name says: a plain box that does not resize and has no title bar.

Yet, under Windows, it becomes a window with a title bar, or I have explicitly to specify it is not realizable.

It goes as far as advising a workaround (which I did already by the way). But that is not what users expect from the long touted cross platform Xojo motto: develop once, compile for many. So now if I create on Mac an app that replies on transparent canvas, and uses plain box windows, it will be completely messed BY DESIGN ? Come on. Stop using and go to AA…

?

I think he meant Alcoholics Anonymous and not the english version of ADAC.

Indeed, In California, it is AA for Alcoholics Anonymous.

[quote=486539:@Michel Bujardet]Yet another nail in the cross platform promise. After the loss of transparency, now the plain box that is not by design.
[/quote]

I suppose the reply there is because if you start, in C, a project that uses a plain box style then you also have to hack around this default behaviour of Windows 10
So this is the default that Xojo exposes

Its just a crappy default MS uses but …

I thought it was Ada or Algol Anonymous :slight_smile:

[quote=486568:@Norman Palardy]I suppose the reply there is because if you start, in C, a project that uses a plain box style then you also have to hack around this default behaviour of Windows 10
So this is the default that Xojo exposes

Its just a crappy default MS uses but …[/quote]

It is possible Windows has a crappy plain box, but that is not a reason to have such a different behavior in Xojo between platforms.

In Mac, a plain box is a plain box. Period. No need to set this or that. Or even to use a declare.

As I said above, it is all a matter of consistency. It is a pity that for some reason, Xojo decided to go for the crappy plain box, instead of the clean plain box, as available out of the box (pun intended) in the Mac version.

I feel the Windows implementation is straying more and more away from what it always was, a clean and faithful implementation close enough to the Mac version to allow building for Windows from a Mac project without undue surprises.

I stay with 2017, because it is the last usable version which demonstrated true cross platform.

2019R1.1 is even worse than Visual Studio, now, with a super crappy pseudo transparency, whereas the Microsoft product offers clean, really transparent, and reliable Canvas.

Something is rotten in the Xojo kingdom…

There is NO such thing as “plain box” in windows.

If Xojo offers that as part of a cross platform, Xojo as a “framework” have to FIX/HACK or whatever to provide what they offer and mantain a decent consistency.

well you’ll have to convince them of that
not me
And see ifyou can get the case reopened

their stance seems to be that a window with no title bar or frame is “plain box”
like this SO thread
https://stackoverflow.com/questions/39731497/create-window-without-titlebar-with-resizable-border-and-without-bogus-6px-whit

and that set up gets this white line

Mimic.

I posted a workaround that takes about 2 minutes to implement.[quote=486710:@Ivan Tellez]If Xojo offers that as part of a cross platform, Xojo as a “framework” have to FIX/HACK or whatever to provide what they offer and mantain a decent consistency.[/quote]

Oh, but there is a plain box window available. Windows has a vast choice of different window styles, one of them I used to post a workaround.

Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (hwnd As Integer, nIndex As Integer, dwNewLong As Integer) As Integer Const GWL_STYLE = -16 dim rien as integer = SetWindowLong(self.handle, GWL_STYLE, &H800000)

https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowlonga