Arsip: Deteksi Perubahan Modus Video (layar)


by LuriDarmawan in Multimedia more 14 years ago 1398
untuk mendeteksi perubahan mode video, dapat dilakukan dengan mencegat message WM_DISPLAYCHANGE
Contoh implementasinya seperti ini:

type
TForm1 = class(TForm)
Label1: TLabel;
private
procedure MyMessage(var Msg: TWMDisplayChange);
message WM_DISPLAYCHANGE;
{ Private declarations }
public
{ Public declarations }
end;
...
procedure TForm1.MyMessage(var Msg: TWMDisplayChange);
begin
Form1.Label1.Caption:=
'New video mode is: '+
IntToStr(Msg.Width)+' - '+
IntToStr(Msg.Height);
end;
Syntax Highlighted with https://pascal-id.org/syntax


Silahkan dicoba dan selalu TetapSEMANGAT!
Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com