1 | //kt -- Modified with SourceScanner on 8/8/2007
|
---|
2 | unit fODMessage;
|
---|
3 |
|
---|
4 | interface
|
---|
5 |
|
---|
6 | uses
|
---|
7 | Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
---|
8 | ExtCtrls, StdCtrls, ComCtrls, DKLang;
|
---|
9 |
|
---|
10 | type
|
---|
11 | TfrmODMessage = class(TForm)
|
---|
12 | memMessage: TRichEdit;
|
---|
13 | imgMessage: TImage;
|
---|
14 | DKLanguageController1: TDKLanguageController;
|
---|
15 | procedure FormDestroy(Sender: TObject);
|
---|
16 | procedure FormCreate(Sender: TObject);
|
---|
17 | private
|
---|
18 | { Private declarations }
|
---|
19 | public
|
---|
20 | { Public declarations }
|
---|
21 | end;
|
---|
22 |
|
---|
23 | procedure ShowOrderMessage(Sender: TForm; const AMsg: string);
|
---|
24 | procedure HideOrderMessage;
|
---|
25 |
|
---|
26 | implementation
|
---|
27 |
|
---|
28 | {$R *.DFM}
|
---|
29 |
|
---|
30 | uses ORFn;
|
---|
31 |
|
---|
32 | var
|
---|
33 | frmODMessage: TfrmODMessage;
|
---|
34 |
|
---|
35 | procedure ShowOrderMessage(Sender: TForm; const AMsg: string);
|
---|
36 | begin
|
---|
37 | frmODMessage := TfrmODMessage.Create(Application);
|
---|
38 | ResizeFormToFont(TForm(frmODMessage));
|
---|
39 | with frmODMessage do
|
---|
40 | begin
|
---|
41 | memMessage.Text := AMsg;
|
---|
42 | SetWindowPos(Handle, HWND_TOPMOST, Left, Top, Width, Height, SWP_NOACTIVATE);
|
---|
43 | Show;
|
---|
44 | Sender.SetFocus;
|
---|
45 | end;
|
---|
46 | end;
|
---|
47 |
|
---|
48 | procedure HideOrderMessage;
|
---|
49 | begin
|
---|
50 | if frmODMessage <> nil then frmODMessage.Release;
|
---|
51 | end;
|
---|
52 |
|
---|
53 | procedure TfrmODMessage.FormDestroy(Sender: TObject);
|
---|
54 | begin
|
---|
55 | frmODMessage := nil;
|
---|
56 | end;
|
---|
57 |
|
---|
58 | procedure TfrmODMessage.FormCreate(Sender: TObject);
|
---|
59 | begin
|
---|
60 | imgMessage.Picture.Icon.Handle := LoadIcon(0, IDI_ASTERISK);
|
---|
61 | end;
|
---|
62 |
|
---|
63 | end.
|
---|
64 |
|
---|