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

如何取得顯示器的字型大小比例???請賜招,謝謝!!

尚未結案
alick
一般會員


發表:2
回覆:12
積分:2
註冊:2003-11-24

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-12-10 09:20:34 IP:61.63.xxx.xxx 未訂閱
delphi 可以取得螢幕解析度..等 但卻沒有看到如何取得字型比例.. 就是在桌面按右鍵..>內容...>設定值..>進階.. >一般..>字型大小 如果有人知道.. 請將其函數或程式貼在回應文章 感激不盡..
qoo1234
版主


發表:256
回覆:1167
積分:659
註冊:2003-02-24

發送簡訊給我
#2 引用回覆 回覆 發表時間:2003-12-10 11:54:17 IP:218.163.xxx.xxx 未訂閱
http://www.elists.org/pipermail/delphi/2001-October/017539.html    網海無涯,學無止境!
alick
一般會員


發表:2
回覆:12
積分:2
註冊:2003-11-24

發送簡訊給我
#3 引用回覆 回覆 發表時間:2003-12-10 12:38:39 IP:61.63.xxx.xxx 未訂閱
thanks
leo2568
中階會員


發表:54
回覆:124
積分:70
註冊:2003-09-21

發送簡訊給我
#4 引用回覆 回覆 發表時間:2003-12-13 12:23:51 IP:61.217.xxx.xxx 未訂閱
引言: http://www.elists.org/pipermail/delphi/2001-October/017539.html
qoo1234
版主


發表:256
回覆:1167
積分:659
註冊:2003-02-24

發送簡訊給我
#5 引用回覆 回覆 發表時間:2003-12-13 13:02:03 IP:218.163.xxx.xxx 未訂閱
procedure TForm1.Button1Click(Sender: TObject);
var
  LogFontStructure: logfont;
begin
  SystemParametersInfo(SPI_GETICONTITLELOGFONT,0, at LogFontStructure,0);
  ShowMessage(LogFontStructure.lfFaceName);
  LogFontStructure.lfFaceName := 'Arial';
  SystemParametersInfo(SPI_SETICONTITLELOGFONT,SizeOf
(LogFontStructure), at LogFontStructure,SPIF_SENDCHANGE);
end;
 
網海無涯,學無止境!
leo2568
中階會員


發表:54
回覆:124
積分:70
註冊:2003-09-21

發送簡訊給我
#6 引用回覆 回覆 發表時間:2003-12-14 16:17:11 IP:61.217.xxx.xxx 未訂閱
引言:
procedure TForm1.Button1Click(Sender: TObject);
var
  LogFontStructure: logfont;
begin
  SystemParametersInfo(SPI_GETICONTITLELOGFONT,0, at LogFontStructure,0);
  ShowMessage(LogFontStructure.lfFaceName);
  LogFontStructure.lfFaceName := 'Arial';
  SystemParametersInfo(SPI_SETICONTITLELOGFONT,SizeOf
(LogFontStructure), at LogFontStructure,SPIF_SENDCHANGE);
end;
 
錯誤無法編譯,能不能請版主說明清楚一點: ↓↓↓↓↓↓↓清楚了,謝謝! 發表人 - leo2568 於 2003/12/14 22:13:55
qoo1234
版主


發表:256
回覆:1167
積分:659
註冊:2003-02-24

發送簡訊給我
#7 引用回覆 回覆 發表時間:2003-12-14 17:10:03 IP:218.163.xxx.xxx 未訂閱
at意思是@符號    
procedure TForm1.Button1Click(Sender: TObject);
var
  LogFontStructure: logfont;
begin
  SystemParametersInfo(SPI_GETICONTITLELOGFONT,0,@LogFontStructure,0);
  ShowMessage(LogFontStructure.lfFaceName);
  LogFontStructure.lfFaceName := 'Arial';
  SystemParametersInfo(SPI_SETICONTITLELOGFONT,SizeOf
(LogFontStructure), @LogFontStructure,SPIF_SENDCHANGE);
end; 
網海無涯,學無止境! 發表人 - qoo1234 於 2003/12/14 17:19:25
alick
一般會員


發表:2
回覆:12
積分:2
註冊:2003-11-24

發送簡訊給我
#8 引用回覆 回覆 發表時間:2003-12-15 08:30:12 IP:61.63.xxx.xxx 未訂閱
SORRY.. 字型是抓到了... but..字型的大小比例...沒有抓到咧..><...
aquarius
資深會員


發表:3
回覆:347
積分:330
註冊:2003-05-21

發送簡訊給我
#9 引用回覆 回覆 發表時間:2003-12-16 12:01:24 IP:211.23.xxx.xxx 未訂閱
系統似乎沒有直接取得比例的 FUNCTION, 至少我還沒找到. 不過可以自行換算出來 NewPercent:=((font.PixelsPerInch*100) div 96) ; ...Aquarius
------
水瓶男的blog: http://791909.blogspot.com
alick
一般會員


發表:2
回覆:12
積分:2
註冊:2003-11-24

發送簡訊給我
#10 引用回覆 回覆 發表時間:2003-12-16 13:11:42 IP:61.63.xxx.xxx 未訂閱
請問如何取得font.PixelsPerInch??
aquarius
資深會員


發表:3
回覆:347
積分:330
註冊:2003-05-21

發送簡訊給我
#11 引用回覆 回覆 發表時間:2003-12-16 15:56:18 IP:211.23.xxx.xxx 未訂閱
引言: 請問如何取得font.PixelsPerInch??
任一個包含 Font 屬性的元件都有呀! 我是直接用 FORM1 的 Font 屬性. ...Aquarius
------
水瓶男的blog: http://791909.blogspot.com
alick
一般會員


發表:2
回覆:12
積分:2
註冊:2003-11-24

發送簡訊給我
#12 引用回覆 回覆 發表時間:2003-12-16 15:58:29 IP:61.63.xxx.xxx 未訂閱
如果是from的.. 那是不是指那個from而已.. 而不是顯示器的設定值..
william
版主


發表:66
回覆:2535
積分:3048
註冊:2002-07-11

發送簡訊給我
#13 引用回覆 回覆 發表時間:2003-12-16 16:26:20 IP:147.8.xxx.xxx 未訂閱
Screen.PixelsPerInch
t27
中階會員


發表:34
回覆:95
積分:90
註冊:2002-06-19

發送簡訊給我
#14 引用回覆 回覆 發表時間:2003-12-16 21:52:39 IP:218.167.xxx.xxx 未訂閱
請問如何設定字型比例?
qoo1234
版主


發表:256
回覆:1167
積分:659
註冊:2003-02-24

發送簡訊給我
#15 引用回覆 回覆 發表時間:2003-12-17 23:26:12 IP:218.163.xxx.xxx 未訂閱
取得顯示器的「圖示」字型大小比例:    ShowMessage(inttostr(Screen.IconFont.Size));//取得字型大小    ...不知道你要顯示器的哪一種字型大小...僅供參考 < src="http://delphi.ktop.com.tw/download/upload\33223_qoo.gif">網海無涯,學無止境!
qoo1234
版主


發表:256
回覆:1167
積分:659
註冊:2003-02-24

發送簡訊給我
#16 引用回覆 回覆 發表時間:2003-12-17 23:41:20 IP:218.163.xxx.xxx 未訂閱
其他請參考Form.pas單元  
 
 TScreen = class(TComponent)
  private
  ....
    procedure IconFontChanged(Sender: TObject);
    function GetCustomFormCount: Integer;
    function GetCustomForms(Index: Integer): TCustomForm;
    function GetCursors(Index: Integer): HCURSOR;
    function GetDataModule(Index: Integer): TDataModule;
    function GetDataModuleCount: Integer;
    function GetDefaultIME: String;
    function GetDesktopTop: Integer;
    function GetDesktopLeft: Integer;
    function GetDesktopHeight: Integer;
    function GetDesktopWidth: Integer;
    function GetDesktopRect: TRect;
    function GetWorkAreaRect: TRect;
    function GetWorkAreaHeight: Integer;
    function GetWorkAreaLeft: Integer;
    function GetWorkAreaTop: Integer;
    function GetWorkAreaWidth: Integer;
    function GetImes: TStrings;
    function GetHeight: Integer;
    function GetMonitor(Index: Integer): TMonitor;
    function GetMonitorCount: Integer;
    function GetFonts: TStrings;
    function GetForm(Index: Integer): TForm;
    function GetFormCount: Integer;
    procedure GetMetricSettings;
    function GetWidth: Integer;
    procedure InsertCursor(Index: Integer; Handle: HCURSOR);
    procedure RemoveDataModule(DataModule: TDataModule);
    procedure RemoveForm(AForm: TCustomForm);
    procedure SetCursors(Index: Integer; Handle: HCURSOR);
    procedure SetCursor(Value: TCursor);
    procedure SetHintFont(Value: TFont);
    procedure SetIconFont(Value: TFont);
    procedure SetMenuFont(Value: TFont);
    procedure UpdateLastActive;
....
網海無涯,學無止境! 發表人 - qoo1234 於 2003/12/17 23:50:24
alick
一般會員


發表:2
回覆:12
積分:2
註冊:2003-11-24

發送簡訊給我
#17 引用回覆 回覆 發表時間:2003-12-18 09:01:59 IP:61.63.xxx.xxx 未訂閱
Thanks qoo1234 & william & leo2568 & aquarius 已經取得 ...................................................... t27 sorry 關於你的問題,請你另開一個主題, 我的問題已經解決了... 能為您服務,是我的榮幸
系統時間:2024-07-04 5:42:32
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!