Question

  Asked: May 28 2008   9:49 AM GMT
  Asked by: Rajalakshmi08


Datetimepicker at runtime


Delphi 5.0, DateTime

Can anyone tell me how to embed the datetime picker at run time id delphi

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



Hello,
here is an example:

unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;
type
TForm1 = class(TForm)
procedure FormShow(Sender: TObject);
End;
var
Form1: TForm1;
implementation
uses
ComCtrls;
{$R *.DFM}
procedure TForm1.FormShow(Sender: TObject);
var
DateTimePicker1: TDateTimePicker;
begin
DateTimePicker1:= TDateTimePicker.Create(Form1);
DateTimePicker1.Parent := Form1;
DateTimePicker1.Width := 200;
DateTimePicker1.Top := 100;
DateTimePicker1.Left := 200;
DateTimePicker1.Visible := True;
DateTimePicker1.BringToFront;
end;

end.
  • AddThis Social Bookmark Button

Browse more Questions and Answers on Development.

Looking for relevant Development Whitepapers? Visit the SearchWinDevelopment.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register