LB Booster
« Transparent window title bars. »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 04:43am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Transparent window title bars.  (Read 322 times)
Alincon
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 147
xx Transparent window title bars.
« Thread started on: Jun 20th, 2016, 01:53am »

Is it possible in LBB to make window title bars opaque, so that whatever is behind a window does not make information in the title bar hard to read?
Is this really a Windows question, not an LBB question?

r.m.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Transparent window title bars.
« Reply #1 on: Jun 20th, 2016, 08:59am »

on Jun 20th, 2016, 01:53am, Alincon wrote:
Is it possible in LBB to make window title bars opaque, so that whatever is behind a window does not make information in the title bar hard to read?

I am assuming that you are asking about making a specific window's title bar opaque; disabling transparency for all windows is of course a simple Windows setting (Control Panel... Personalization... Window Color... Enable Transparency).

This code makes the non-client area of the specified window opaque:

Code:
    nomainwin
    open "Opaque Window Title" for window as #w
    #w "trapclose quit"

    struct policy, n as long
    l = len(policy.struct)
    policy.n.struct = 1 ' disable transparency
    
    hw = hwnd(#w)
    open "dwmapi.dll" for dll as #dwm
    calldll #dwm, "DwmSetWindowAttribute", hw as ulong, 2 as long, _
                    policy as struct, l as long, r as long
        
    wait
    
sub quit h$
    close #dwm
    close #h$
    end
end sub 

Of course in Windows 8 and Windows 10 title bars are always opaque anyway, so this code only does something useful in Windows Vista and 7.

Richard.
« Last Edit: Jun 20th, 2016, 09:00am by Richard Russell » User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls