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

如何知道解析度

答題得分者是:salo0610
ksmf
一般會員


發表:7
回覆:11
積分:3
註冊:2005-07-10

發送簡訊給我
#1 引用回覆 回覆 發表時間:2007-10-17 15:19:32 IP:220.130.xxx.xxx 訂閱
請教各位,目前的螢幕解析度如何知道800x600 或 1024x768?

謝謝
jow
尊榮會員


發表:66
回覆:751
積分:1253
註冊:2002-03-13

發送簡訊給我
#2 引用回覆 回覆 發表時間:2007-10-17 15:22:25 IP:210.66.xxx.xxx 訂閱
Screen->Width, Screen->Height

請查閱Help: Screen

A global variable of type TScreen called Screen is created when you create a project.

(以下省略)

編輯記錄
jow 重新編輯於 2007-10-17 15:24:18, 註解 無‧
salo0610
高階會員


發表:42
回覆:120
積分:107
註冊:2003-02-18

發送簡訊給我
#3 引用回覆 回覆 發表時間:2007-10-17 16:45:21 IP:220.132.xxx.xxx 未訂閱
GetSystemMetrics(SM_CXSCREEN);
GetSystemMetrics(SM_CYSCREEN);


The GetSystemMetrics function retrieves various system metrics and system configuration settings.
System metrics are the dimensions (widths and heights) of Windows display elements. All dimensions retrieved by GetSystemMetrics are in pixels.

int GetSystemMetrics(
int nIndex // system metric or configuration setting to retrieve
);

jow
尊榮會員


發表:66
回覆:751
積分:1253
註冊:2002-03-13

發送簡訊給我
#4 引用回覆 回覆 發表時間:2007-10-17 17:04:35 IP:210.66.xxx.xxx 訂閱
不管用或不用Screen物件, 應用程式建立的時候,Screen就已經被產生起來了喔!!    ^__^


[code delphi]
function TScreen.GetHeight: Integer;
begin
Result := GetSystemMetrics(SM_CYSCREEN);
end;
function TScreen.GetWidth: Integer;
begin
Result := GetSystemMetrics(SM_CXSCREEN);
end;
[/code]
ksmf
一般會員


發表:7
回覆:11
積分:3
註冊:2005-07-10

發送簡訊給我
#5 引用回覆 回覆 發表時間:2007-10-18 16:47:03 IP:220.130.xxx.xxx 訂閱
謝謝各位,salo0610 大大說的是.



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