?? unitseldict.pas
字號:
unit UnitSELDict;
interface
uses
Windows, SysUtils, Classes, shellapi, Controls, Forms,
StdCtrls;
type
TFrmSelDict = class(TForm)
GroupBox1: TGroupBox;
ComboBox1: TComboBox;
Button1: TButton;
Button2: TButton;
procedure FormShow(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormDeactivate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
Procedure CreateParams(Var Params: TCreateParams); Override;
end;
var
FrmSelDict: TFrmSelDict;
implementation
uses UnitMain;
{$R *.dfm}
Procedure TFrmSelDict.CreateParams(Var Params:TCreateParams);
Begin
inherited CreateParams( Params);
with params do
begin
ExStyle := Params.ExStyle or WS_EX_TOPMOST or WS_EX_TOOLWINDOW;
WndParent := FrmMain.Handle;
end
End;
procedure TFrmSelDict.FormShow(Sender: TObject);
var i:integer;
begin
left:=frmmain.left;
top:=FrmMain.Top+FrmMain.Height;
//-----------------------
combobox1.clear;
for i:= 1 to frmmain.dictdb.DBMax do
begin
combobox1.Items.Add(frmmain.dictdb.dblist[i]);
if frmmain.dictdb.dblist[i] = frmmain.curdict then
combobox1.ItemIndex := i-1;
end;
// SetWindowPos(handle,hwnd_TopMost,0,0,0,0,swp_NoMove or swp_NoSize)
end;
procedure TFrmSelDict.Button1Click(Sender: TObject);
begin
//FrmMain.CurDict:=ComboBox1.Text;
FrmMain.ReLoadDict(Trim(ComboBox1.Text));
FrmMain.CurDict:=Trim(ComboBox1.Text);
if not FrmMain.Timer1.Enabled then FrmMain.Timer1.Enabled:=True;
close;
end;
procedure TFrmSelDict.Button2Click(Sender: TObject);
begin
close;
end;
procedure TFrmSelDict.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action:=cafree;
FrmSelDict:=nil;
end;
procedure TFrmSelDict.FormDeactivate(Sender: TObject);
begin
//SetWindowPos(handle,hwnd_TopMost,0,0,0,0,swp_NoMove or swp_NoSize)
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -