這取決於你要放大什麼樣的內容; 我只會張貼在這裏怎麼走多久車輪已經上移到
私人聲明
private
{ Private declarations }
procedure FormMouseWheel(Sender: TObject; Shift: TShiftState;
WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
創建或任何其他啓動程序
OnMouseWheel := formMouseWheel; // depends on you
的FormMouseWheel就這樣產生了
procedure FormMouseWheel(Sender: TObject; Shift: TShiftState;
WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
begin
// your code here
// WheelDelta returns you - or + values (in my computer -120 and + 120 ;
// It depends on control panel mouse wheel settings)
// If it is a font make the font size bigger or
// if it is a image
// strech := true;
// increase width and height of the Timage
//and put them inside a scrollbox
//
end;
我用vcl格式檢查過它(not ins IDE組件), 如果你想放大後我們你想要什麼樣的內容放大
我不認爲這可以在組件中可靠地完成,因爲鼠標滾輪信息並不總是進入鼠標下的窗口。從我的觀察結果來看,輪子信息有時只發送到「窗體」窗口,有時只發送到鼠標下的窗口,有時它們被髮送到兩個窗口!我的問題的解決方法是將消息從Form窗口轉發到相關的子組件,並且在子組件中,我編寫了一些代碼以避免重複激活。麻煩的是,我的解決方案需要來自表單的協作,所以它不是「自包含的」。 – 2010-12-07 10:01:02