線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:2037
推到 Plurk!
推到 Facebook!

元件的top bottom left的數值該如何轉成pixel值..?

答題得分者是:Fishman
firesu
中階會員


發表:26
回覆:28
積分:55
註冊:2004-12-27

發送簡訊給我
#1 引用回覆 回覆 發表時間:2007-01-29 08:36:36 IP:61.62.xxx.xxx 未訂閱
元件的left, top, bottom 等數值有方法轉成螢幕的pixel值嗎.?
Fishman
尊榮會員


發表:120
回覆:1949
積分:2163
註冊:2006-10-28

發送簡訊給我
#2 引用回覆 回覆 發表時間:2007-01-29 12:36:01 IP:210.65.xxx.xxx 未訂閱
TControl.ClientToScreen
Translates a given point from client area coordinates to global screen coordinates.
function ClientToScreen(const Point: TPoint): TPoint;
Description
Use ClientToScreen to convert a point whose coordinates are expressed locally to the control to the corresponding point in screen coordinates. In client area coordinates (0, 0) corresponds to the upper left corner of the control's client area. In screen coordinates (0, 0) corresponds to the upper left corner of the screen.
Use ScreenToClient along with ClientToScreen to convert from one control's coordinate system to another control's coordinate system. For example,
P := TargetControl.ScreenToClient(SourceControl.ClientToScreen(P));
converts P from coordinates in SourceControl to coordinates in TargetControl.


Fishman
------
Fishman
系統時間:2024-04-26 15:29:02
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!