Last change
on this file since 1099 was 459, checked in by Kevin Toppenberg, 16 years ago |
Adding foia-cprs branch
|
File size:
1.3 KB
|
Rev | Line | |
---|
[459] | 1 | unit fODMessage;
|
---|
| 2 |
|
---|
| 3 | interface
|
---|
| 4 |
|
---|
| 5 | uses
|
---|
| 6 | Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
---|
| 7 | ExtCtrls, StdCtrls, ComCtrls;
|
---|
| 8 |
|
---|
| 9 | type
|
---|
| 10 | TfrmODMessage = class(TForm)
|
---|
| 11 | memMessage: TRichEdit;
|
---|
| 12 | imgMessage: TImage;
|
---|
| 13 | procedure FormDestroy(Sender: TObject);
|
---|
| 14 | procedure FormCreate(Sender: TObject);
|
---|
| 15 | private
|
---|
| 16 | { Private declarations }
|
---|
| 17 | public
|
---|
| 18 | { Public declarations }
|
---|
| 19 | end;
|
---|
| 20 |
|
---|
| 21 | procedure ShowOrderMessage(Sender: TForm; const AMsg: string);
|
---|
| 22 | procedure HideOrderMessage;
|
---|
| 23 |
|
---|
| 24 | implementation
|
---|
| 25 |
|
---|
| 26 | {$R *.DFM}
|
---|
| 27 |
|
---|
| 28 | uses ORFn;
|
---|
| 29 |
|
---|
| 30 | var
|
---|
| 31 | frmODMessage: TfrmODMessage;
|
---|
| 32 |
|
---|
| 33 | procedure ShowOrderMessage(Sender: TForm; const AMsg: string);
|
---|
| 34 | begin
|
---|
| 35 | frmODMessage := TfrmODMessage.Create(Application);
|
---|
| 36 | ResizeFormToFont(TForm(frmODMessage));
|
---|
| 37 | with frmODMessage do
|
---|
| 38 | begin
|
---|
| 39 | memMessage.Text := AMsg;
|
---|
| 40 | SetWindowPos(Handle, HWND_TOPMOST, Left, Top, Width, Height, SWP_NOACTIVATE);
|
---|
| 41 | Show;
|
---|
| 42 | Sender.SetFocus;
|
---|
| 43 | end;
|
---|
| 44 | end;
|
---|
| 45 |
|
---|
| 46 | procedure HideOrderMessage;
|
---|
| 47 | begin
|
---|
| 48 | if frmODMessage <> nil then frmODMessage.Release;
|
---|
| 49 | end;
|
---|
| 50 |
|
---|
| 51 | procedure TfrmODMessage.FormDestroy(Sender: TObject);
|
---|
| 52 | begin
|
---|
| 53 | frmODMessage := nil;
|
---|
| 54 | end;
|
---|
| 55 |
|
---|
| 56 | procedure TfrmODMessage.FormCreate(Sender: TObject);
|
---|
| 57 | begin
|
---|
| 58 | imgMessage.Picture.Icon.Handle := LoadIcon(0, IDI_ASTERISK);
|
---|
| 59 | end;
|
---|
| 60 |
|
---|
| 61 | end.
|
---|
| 62 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.