The border of any window is controlled by the OS, not the application.
What about WM_NCPAINT?
As mentioned this isn't cross platform and especially on Linux with X11 dealing with the Window Managers can be quite a mess...
Nothing stops you from setting your borderstyle to bsNone and draw your own (though you also need to handle window movement yourself then).
Yep, but if I set the BorderStyle to bsNone, then I will automatically lose the system context menu, which is available by clicking LMB on the form icon or RMB on caption bar, or by pressing Alt+Space. And, because of this, I will lose the whole system mechanism to moving and resizing the form too.
That's what I meant with
though you also need to handle window movement yourself then.
NOT portable.
That depends on the definition of portable. My definition of portable is: put it on a USB drive and run it without any "unusual" dependencies such as a C runtime library (dll), IOW, a stand alone program.
440bx, please, I know you are rather Windows centered, but even you should be aware that “portable” on this forum more often than not means “cross platform”.
[...]
What about WM_NCPAINT?
[...]
In my opinion, such a solution should be adequate to axisdj in his request:
[...]
I am in the process of becoming comfortable with Lazarus, and making a goal to move from vb6.
[...]
he says he wants to "migrate" from vb6 to FPC; vb6 was usually used to produce executables for Windows.
But
axisdj should know the limitations they're facing right away and maybe pursue a better/different way from the start. Otherwise they'll come along in a few months, ask how to do that on Linux (cause they've discovered, hey, with Lazarus one can also do Linux programs!) and then we say, “though luck,
axisdj, that won't work on Linux or at least will be very specific to the window manager”.
Don't take me wrong, there is nothing bad about making an application that's only supposed to work on a specific set of platforms. But if one doesn't need to restrict oneself unnecessarily, why do it?