Is there a way to hide the small app icon in the Window (top right)?
Also, is it possible to change the window topbar color?
Basically I need to have something like the System Settings window
I know I can use a Plain window but in that case I need to emulate the top right buttons (close, size, …) and it would look odd on Vista (with Window 8/10 buttons).
While I am reading this thread in Firefox, I see that Firefox’s window has no app icon at the Top-Left (not Top-Right, is that what you meant, Christoph?)
Yes I meant top left … sorry about the confusion.
Waynes trick does work but it also means there is no icon for your app in the Explorer when it displays 128x128 icons.
I guess the only way to do this is to fake it with a Plane Box window.
Creating the close/minimise/maximise buttons isn’t difficult using canvas but is there a way to grab the images from the OS so when you you run it on Vista, it return the Vista close/minimise/maximise images?
Of course I can include both Vista and Windows 8/10 images but I think it can be done with declares too.
I think this will do some of what you want… drop it in the open event of the window.
[code] #if targetwin32
const WTA_NONCLIENT = 1
const WTNCA_NODRAWCAPTION = &H00000001
//Prevents the window caption from being drawn.
const WTNCA_NODRAWICON = &H00000002
//Prevents the system icon from being drawn.
const WTNCA_NOSYSMENU = &H00000004
declare function SetWindowThemeAttribute lib "UxTheme" (win as ptr, attributetype as uint32, atts as ptr, size as uint32 ) as uint32
dim atts as new MemoryBlock(8)
atts.UInt32Value(0)=WTNCA_NODRAWCAPTION or WTNCA_NODRAWICON or WTNCA_NOSYSMENU
atts.UInt32Value(4)=WTNCA_NODRAWCAPTION or WTNCA_NODRAWICON or WTNCA_NOSYSMENU
dim res as uint32= SetWindowThemeAttribute(ptr(self.Handle),WTA_NONCLIENT,atts,atts.Size)