source: cprs/branches/foia-cprs/CPRS-Chart/Orders/fODMessage.pas@ 697

Last change on this file since 697 was 459, checked in by Kevin Toppenberg, 16 years ago

Adding foia-cprs branch

File size: 1.3 KB
RevLine 
[459]1unit fODMessage;
2
3interface
4
5uses
6 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
7 ExtCtrls, StdCtrls, ComCtrls;
8
9type
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
21procedure ShowOrderMessage(Sender: TForm; const AMsg: string);
22procedure HideOrderMessage;
23
24implementation
25
26{$R *.DFM}
27
28uses ORFn;
29
30var
31 frmODMessage: TfrmODMessage;
32
33procedure ShowOrderMessage(Sender: TForm; const AMsg: string);
34begin
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;
44end;
45
46procedure HideOrderMessage;
47begin
48 if frmODMessage <> nil then frmODMessage.Release;
49end;
50
51procedure TfrmODMessage.FormDestroy(Sender: TObject);
52begin
53 frmODMessage := nil;
54end;
55
56procedure TfrmODMessage.FormCreate(Sender: TObject);
57begin
58 imgMessage.Picture.Icon.Handle := LoadIcon(0, IDI_ASTERISK);
59end;
60
61end.
62
Note: See TracBrowser for help on using the repository browser.