Hi all,
i am new to c#, & i want to display a calendar. when the user clicked in a textbox the calendar should be displayed & not before.how i do that? plz tell me
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Hirendra SisodiyaPosted Mar 30, 2010, 10:04 AM
hello Seema
you can do this in two easily ways :
Add monthcalander control and set the visibilty to false and write code on textbox click event:
monthCalendar1.Visible = true;
monthCalendar1.Location = new System.Drawing.Point(textBox1.Left, textBox1.Top + textBox1.Height);
--Or--
you can create monthcontrol object and can show on click event
MonthCalendar mnt = new MonthCalendar();
mnt.Location = new System.Drawing.Point(textBox1.Left, textBox1.Top + textBox1.Height);
textBox1.Parent.Controls.Add(mnt);
mnt.Show();
thanks
Please mark as answere if it helps