1. 程式人生 > >Delphi無需程式碼實現透明窗體顯示文字

Delphi無需程式碼實現透明窗體顯示文字

設定以下屬性即可實現透明窗體顯示文字:

===========================================
設定窗體屬性:

BorderStyle                    屬性設定為 bsNone
Color                              屬性設定為 clWhite(白色:窗體背景色)
TransparentColor           屬性設定為 true
TransparentColorValue  屬性設定為 clWhite(白色:透明顏色)

//以上兩顏色需一致才能使窗體透明
===========================================
設定Label屬性:

Color                              屬性設定為 clWhite(白色:透明顏色)
Font.Color                      屬性設定為 clRed(非透明顏色即可)
Transparent                   屬性設定為 true
===========================================