2016-02-26 34 views
-1

在我的應用程序中,我想使用提示來顯示其他信息。從提示中隱藏DropShadow

它看起來像這樣:

enter image description here

我注意到,Firefox的顯示提示沒有陰影效果:

enter image description here

我對谷歌的研究只給我帶來了問題有關添加陰影效果(XP天),而不是刪除它們。

所以我的問題是: 如何從提示中刪除dropshadow?謝謝。

回答

3

您只需創建自己的提示窗口類繼承自THintWindow,在CreateParams中刪除CS_DROPSHADOW,然後將vcl設置爲使用您的類而不是默認類。

TMyHintWindow = class(THintWindow) 
protected 
    procedure CreateParams(var Params: TCreateParams); override; 
end; 

procedure TMyHintWindow.CreateParams(var Params: TCreateParams); 
begin 
    inherited CreateParams(Params); 
    Params.WindowClass.Style := Params.WindowClass.style and not CS_DROPSHADOW; 
end; 

procedure TForm1.FormCreate(Sender: TObject); 
begin 
    FOldHint := HintWindowClass; 
    HintWindowClass := TMyHintWindow; 
    // FOldHint is type of THintWindowClass; 
    // If you like to reset hint window to its original value you just set it back to FOldHint 
    // HintWindowClass := FOldHint; 
end; 
+0

所以這是爲vcl。我傾向於忘記fmx。 –