📄 aboutdialog_frm.pas
字号:
(*
* FeedReader
* Copyright (C) 2003 The FeedReader Developement Group
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*)
unit AboutDialog_FRM;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, ComCtrls;
type
TAboutDialog = class(TForm)
Label2: TLabel;
lblVersion: TEdit;
Label3: TLabel;
lblBuild: TEdit;
btnOK: TButton;
Image2: TImage;
Label1: TLabel;
Panel1: TPanel;
Label5: TLabel;
Memo1: TMemo;
procedure FormCreate(Sender: TObject);
procedure btnOKClick(Sender: TObject);
private
{ Private declarations }
protected
//procedure WndProc(var Message: TMessage); override;
public
{ Public declarations }
end;
implementation
Uses
ShellAPI,
MProperties, uMain,XFunctions;
{$R *.dfm}
procedure TAboutDialog.FormCreate(Sender: TObject);
Var
Mask: Integer;
Pt: TPoint;
begin
Label5.Caption := 'Author : Ptma ';
lblVersion.Text := GetFileVersion( Application.ExeName, False, False );
lblBuild.Text := GetFileVersion( Application.ExeName, False, True );
// enable the hi-lighting of URLs
//
// to receive the URL-click notifcation the RichEdit has to be a
// a child of the mainform. There are other possibilities but this
// is the easisest for this scenario.
{Pt := Point( RichEdit1.Left, RichEdit1.Top );
Pt := TabSheet2.ClientToScreen( Pt );
Pt := Self.ScreenToClient( Pt );
RichEdit1.Parent := Self;
RichEdit1.Visible := False;
SendMessage( RichEdit1.Handle, EM_AUTOURLDETECT, Ord(True), 0 );
RichEdit1.Text := RichEdit1.Text + #13#10;
Mask := SendMessage( RichEdit1.Handle, EM_GETEVENTMASK, 0, 0 );
SendMessage( RichEdit1.Handle, EM_SETEVENTMASK, 0, Mask Or ENM_LINK );
RichEdit1.Left := Pt.X;
RichEdit1.Top := Pt.Y; }
end;
{procedure TAboutDialog.WndProc(var Message: TMessage);
var
p: TENLink;
URL: string;
begin
if (Message.Msg = WM_NOTIFY) then
begin
if (PNMHDR(Message.LParam).code = EN_LINK) then
begin
p := TENLink(Pointer(TWMNotify(Message).NMHdr)^);
if (p.msg = WM_LBUTTONDOWN) then
begin
SendMessage(RichEdit1.Handle, EM_EXSETSEL, 0, LongInt(@(p.chrg)));
URL := RichEdit1.SelText;
ShellExecute(Handle, 'open', PChar(URL), Nil, Nil, SW_SHOWNORMAL);
end
end
end;
inherited;
end; }
procedure TAboutDialog.btnOKClick(Sender: TObject);
begin
close;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -