source: cprs/branches/GUI-config/SelDateTimeU.pas@ 755

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

New WorldVistA Config Utility

File size: 988 bytes
RevLine 
[476]1unit SelDateTimeU;
2(* WorldVistA Configuration Utility
3 (c) 8/2008. Released under LGPL
4 Programmed by Kevin Toppenberg, Eddie Hagood *)
5
6interface
7
8uses
9 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
10 Dialogs, StdCtrls, Buttons, ComCtrls;
11
12type
13 TSelDateTimeForm = class(TForm)
14 DateTimePicker: TDateTimePicker;
15 OKBtn: TBitBtn;
16 CancelBtn: TBitBtn;
17 procedure FormShow(Sender: TObject);
18 private
19 { Private declarations }
20 public
21 { Public declarations }
22 end;
23
24var
25 SelDateTimeForm: TSelDateTimeForm;
26
27implementation
28
29
30{$R *.dfm}
31
32 procedure TSelDateTimeForm.FormShow(Sender: TObject);
33 var mousePos : TPoint;
34 begin
35 GetCursorPos(mousePos);
36 with SelDateTimeForm do begin
37 Top := mousePos.Y - 39;
38 Left := mousePos.X - 15;
39 if Left + Width > Screen.DesktopWidth then begin
40 Left := Screen.DesktopWidth - Width;
41 end;
42 end;
43 end;
44
45end.
46
Note: See TracBrowser for help on using the repository browser.