source: cprs/branches/tmg-cprs/CPRS-Chart/Orders/fODMessage.pas@ 1725

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

Initial upload of TMG-CPRS 1.0.26.69

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