Datetimepicker at runtime

240 pts.
Tags:
DateTime
Delphi 5.0
Can anyone tell me how to embed the datetime picker at run time id delphi
ASKED: May 28, 2008  9:49 AM
UPDATED: May 28, 2008  12:10 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hello,
here is an example:
<pre>
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.
</pre>

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following