Tabbing DateTimePicker gives a beep

  • Thread starter Thread starter Jayesh
  • Start date Start date
J

Jayesh

Hi
I have panel in which I have DateTimePicker. Here is the code

DateTimePicker datePicker = new DateTimePicker();
datePicker.Format = DateTimePickerFormat.Custom;
datePicker.CustomFormat = Constants.DisplayDateFormat;
datePicker.Font = mycustomFont;
datePicker.ShowUpDown = false;
datePicker.Size = new Size(Constant,Constant)

When I hit tab on DateTimePicker control to move focus to next TextBox
control in the panel, it is giving a beep. Please help.
 
I am using .NET CF 2.0 C# in windows mobile 5.0 device.

I tried using OPENNETCF datetimepicker2. It is also having some
beeping issue. I also tried windows application having DateTimePicker
that also giving same problem. Is there any way to get rid of the
beep?

Thanks,
Jayesh Modha
 
Hi Jayesh,

On DateTimePicker Control keypress event, by pass the default
control's handling.

private void dateTimePicker1_KeyPress(object sender, KeyPressEventArgs
e)
{
if ((e.KeyChar == '\t'))
{
e.Handled = true;
}
}

Hope this helps,
Cheers,
Arun
www.innasite.com
 
Hi Jayesh,

On DateTimePicker Control keypress event, by pass the default
control's handling.

private void dateTimePicker1_KeyPress(object sender, KeyPressEventArgs
e)
{
if ((e.KeyChar == '\t'))
{
e.Handled = true;
}
}

Hope this helps,
Cheers,
Arunwww.innasite.com

Arun,

Thanks a lot for solution. it works fine.

Thanks,
Jayesh Modha
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top