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

請問如何偵測螢幕的解析度

尚未結案
AJCooer
初階會員


發表:48
回覆:52
積分:25
註冊:2004-02-12

發送簡訊給我
#1 引用回覆 回覆 發表時間:2005-01-13 16:52:32 IP:220.130.xxx.xxx 未訂閱
如題 請問如何偵測螢幕的解析度? 例如 當1024 * 768 變成 800 * 600時候 如何得知已經變成 800 * 600了
李國維
高階會員


發表:42
回覆:287
積分:235
註冊:2003-02-07

發送簡訊給我
#2 引用回覆 回覆 發表時間:2005-01-13 18:07:49 IP:220.130.xxx.xxx 未訂閱
AJCooer: DEVMODE deDisplayMode; EnumDisplaySettings( NULL, ENUM_CURRENT_SETTINGS, &deDisplayMode); //deDisplayMode.dmPelsWidth 寬度 //deDisplayMode.dmPelsHeight 高度
pwipwi
版主


發表:68
回覆:629
積分:349
註冊:2004-04-08

發送簡訊給我
#3 引用回覆 回覆 發表時間:2005-01-13 22:13:50 IP:211.76.xxx.xxx 未訂閱
提供另一個取得方法:    範例來自bcb的help         
The following code determines the height of all forms on the screen and resizes any that are taller than the screen height.    for (int i = 0; i < Screen->FormCount; i  )    {
  if (Screen->Forms[i]->Height > Screen->Height)
    Forms[i]->Height = Screen->Height;
  if (Screen->Forms[i]->Width > Screen->Width)
    Forms[i]->Width = Screen->Width;
}
 
blk5743
高階會員


發表:34
回覆:371
積分:236
註冊:2003-11-17

發送簡訊給我
#4 引用回覆 回覆 發表時間:2005-01-14 08:54:03 IP:61.66.xxx.xxx 未訂閱
int iScrWidth,iScrHeight; iScrWidth = GetSystemMetrics(SM_CXSCREEN); iScrHeight = Screen->Height;
AJCooer
初階會員


發表:48
回覆:52
積分:25
註冊:2004-02-12

發送簡訊給我
#5 引用回覆 回覆 發表時間:2005-01-14 10:26:18 IP:61.218.xxx.xxx 未訂閱
嗯  各位大大     小弟大概了解了< > 謝謝 各位大大的幫忙.大家的說法都對我有幫助 真是難以抉擇要如何給分ㄟ< > 嗯 待我想想
系統時間:2024-06-30 14:08:21
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!