-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLyricShow.pas
56 lines (44 loc) · 1.48 KB
/
LyricShow.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{*******************************************************}
{ 单 元 名:ULyricShow.pas }
{ }
{ 作者:ying32 }
{ QQ:396506155 }
{ E-mail:[email protected] }
{ http://www.ying32.tk }
{ 版权所有 (C) 2011-2012 ying32 }
{*******************************************************}
unit LyricShow;
interface
uses
Windows, Classes, ExtCtrls, Forms, GDILyrics;
type
TLyricShowForm = class(TForm)
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
{ Private declarations }
public
protected
end;
var
LyricShowForm: TLyricShowForm; GDILyric: TGDIDrawLyric;
implementation
uses core;
{$R *.dfm}
procedure TLyricShowForm.FormCreate(Sender: TObject);
begin
ParentWindow := GetDesktopWindow;
GDILyric := TGDIDrawLyric.Create(Handle);
Width := CurMonitor.Width;
Height := (CurMonitor.WorkareaRect.Bottom - CurMonitor.WorkareaRect.Top)*140 div 770;
Left := CurMonitor.Left;
Top := CurMonitor.Top + CurMonitor.WorkareaRect.Bottom
- CurMonitor.WorkareaRect.Top - Height;
GDILyric.SetWidthAndHeight(Width, Height);
if dlod then Show else Hide;
end;
procedure TLyricShowForm.FormDestroy(Sender: TObject);
begin
GDILyric.Free;
end;
end.