Here a small example window that works for me with PB 2019 R3.
I've only copied the external functions declarations. If you want to use the example in a 64bit application you shound change the pointer variables!
There is still a remaining small shadow of window background color around the text. I don't know how to remove this. Because of this I choosed two almost identical colors (blue and navy) for window background and text color in my example.
forward
global type w_test from window
end type
type st_1 from statictext within w_test
end type
end forward
global type w_test from window
integer width = 873
integer height = 372
boolean titlebar = true
string title = "Untitled"
boolean controlmenu = true
boolean minbox = true
boolean maxbox = true
boolean resizable = true
long backcolor = 16711680
string icon = "AppIcon!"
boolean center = true
st_1 st_1
end type
global w_test w_test
type prototypes
Function long GetWindowLong (ulong hWnd, int nIndex) Library "user32.dll" Alias for "GetWindowLongW"
Function long SetWindowLong (ulong hWnd, int nIndex, long dwNewLong) Library "user32.dll" Alias for "SetWindowLongW"
Function Long SetLayeredWindowAttributes(ulong hWnd, Long crKey , byte bAlpha , Long dwFlags) Library "user32.dll"
Function Boolean SetMenu(ulong hWnd, ulong hMenu) Library "user32.dll"
end prototypes
on w_test.create
this.st_1=create st_1
this.Control[]={this.st_1}
end on
on w_test.destroy
destroy(this.st_1)
end on
event open;Constant long LWA_COLORKEY = 1
Constant long GWL_EXSTYLE = -20
Constant long WS_EX_LAYERED = Long(2^19)
Constant long GWL_STYLE = -16
Constant long WS_VISIBLE = 268435456
Constant long WS_MAXIMIZE = 16777216
Constant long WS_CLIPCHILDREN = 33554432
Constant long WS_CLIPSIBLINGS = 67108864
long ll_null_handle
SetWindowLong ( Handle(this), GWL_EXSTYLE, &
GetWindowLong( Handle (this), GWL_EXSTYLE ) + WS_EX_LAYERED)
SetLayeredWindowAttributes(Handle(this), This.BackColor , BYTE(0), LWA_COLORKEY)
SetWindowLong(Handle(THIS), GWL_STYLE, WS_VISIBLE /*+ WS_MAXIMIZE */ + WS_CLIPCHILDREN + WS_CLIPSIBLINGS)
THIS.ClientEdge = FALSE
SetNull(ll_null_handle)
SetMenu(Handle(THIS), ll_null_handle)
end event
type st_1 from statictext within w_test
integer x = 197
integer y = 56
integer width = 439
integer height = 160
integer textsize = -20
integer weight = 700
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 8388608
long backcolor = 553648127
string text = "TEST"
alignment alignment = center!
boolean focusrectangle = false
end type