?? 控件大小的縮放: (2000年12月29日).txt
字號:
控件大小的縮放: (2000年12月29日)
網(wǎng)友更新 分類:圖形圖象 作者: maming(推薦) 推薦:maming 閱讀次數(shù):473
(http://www.codesky.net)
--------------------------------------------------------------------------------
type
tddhsizebutton=class(tbutton)
public
procedure WmNcHitTest(var msg:TWmNcHitTest);
message wm_NcHitTest;
end;
procedure TDdhSizeButton.WmNcHitTest(var msg:TWmNcHitTest);
var
pt:tpoint;
begin
pt:=point(msg.xpos,msg.ypos);
pt:=ScreentoClient(pt);
if (pt.x<5) and (pt.y<5) then
msg.Result:=httopright
else if (pt.x>width-5) and (pt.y<5) then
msg.Result:=httopright
else if (pt.x >width-5) and (pt.y>height-5) then
msg.Result:=htbottomright
else if (pt.x<5) and (pt.y>height-5) then
msg.Result:=htbottomleft
else if (pt.x<5) then
msg.Result:=htleft
else if (pt.y<5) then
msg.Result:=httop
else if (pt.x>width-5) then
msg.Result:=htright
else if (pt.y>height-5) then
msg.Result:=htbottom
else
inherited;
end;
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -