捕捉全屏图像
摘要:unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; procedure Button...
阅读全文
posted @
2008-05-16 14:30
万一
阅读(5312)
推荐(0) 编辑
TScreen 类 - 获取当前输入法与输入法列表
摘要://获取输入法列表 begin Memo1.Lines := Screen.Imes; end; //获取当前输入法 var kl: HKL; i: Integer; begin kl := GetKeyboardLayout(0); for i := 0 to Screen.Imes.Count - 1 do if HKL(Screen.Imes.Objects...
阅读全文
posted @
2008-01-22 16:58
万一
阅读(6824)
推荐(0) 编辑
TScreen 类 - 判断当前焦点在哪个窗体上
摘要:unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls; type TForm1 = class(TForm) Timer1: TTimer; Button1:...
阅读全文
posted @
2008-01-22 16:50
万一
阅读(3974)
推荐(0) 编辑
TScreen 类 - 判断当前焦点在哪个控件上
摘要:procedure TForm1.Timer1Timer(Sender: TObject); begin Text := Screen.ActiveControl.ClassName; end; {多放几个控件, 按 Tab 测试; 但并不是所有控件都有焦点}
阅读全文
posted @
2008-01-22 16:39
万一
阅读(5353)
推荐(0) 编辑
TScreen 类 - 使用 Screen.Cursors
摘要:unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls; type TForm1 = class(TForm) Timer1: TTimer; {需要个定时器} ...
阅读全文
posted @
2008-01-22 16:02
万一
阅读(3659)
推荐(0) 编辑
TScreen 类 - 通过 Screen 更换光标
摘要://更换窗体或某个控件的光标可以不通过 Screen 对象, 譬如: begin Self.Cursor := crAppStart; Panel1.Cursor := crHandPoint; {光标可选值: crDefault = TCursor(0); crNone = TCursor(-1); crArrow = TCursor(-...
阅读全文
posted @
2008-01-22 15:12
万一
阅读(4419)
推荐(0) 编辑
TScreen 类 - 程序中窗体的个数
摘要://一个包含两个窗体的例子, 这是工程中的内容: program Project1; uses Forms, Unit1 in 'Unit1.pas' {Form1}, Unit2 in 'Unit2.pas' {Form2}; {$R *.res} begin Application.Initialize; Application.MainFormOnTaskbar ...
阅读全文
posted @
2008-01-22 14:10
万一
阅读(3314)
推荐(0) 编辑
TScreen 类 - 关于 Screen 对象
摘要:Screen 对象是 TScreen 类的一个变量, 它声明在 Forms 单元的第 1323 行(Delphi 2007); 并且 TScreen 类也来自 Forms 单元. 也就是说, 只要 uses 了 Forms 单元, Screen 对象就可以使用了. 我们自己建立一个 TScreen 类的对象可以吗? 当然可以! var MyScreen: TScreen; begin ...
阅读全文
posted @
2008-01-22 13:23
万一
阅读(4594)
推荐(0) 编辑
TScreen 类 - 屏幕的逻辑宽度与高度
摘要:var w,h: Integer; begin w := Screen.Width; h := Screen.Height; Text := Format('当前屏幕的分辨率是: %d*%d', [w,h]); end;
阅读全文
posted @
2008-01-22 13:09
万一
阅读(4216)
推荐(0) 编辑
TScreen 类 - 获取字体列表
摘要:unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Memo1: TMemo; procedure FormCreate...
阅读全文
posted @
2008-01-22 13:03
万一
阅读(5307)
推荐(0) 编辑