You can inherit from listbox,then override the OnKeyDown event,like below:
protected override void OnKeyDown(KeyEventArgs e)
{
e.SuppressKeyPress = true;
switch (e.KeyData)
{
case Keys.D0:
case Keys.OemPeriod:
case Keys.Decimal:
if (this.InputType == NordaBaseInputType.Float)
e.SuppressKeyPress = false;
break;
default:
break;
}
base.OnKeyDown(e);
}
this is a script of my program
-------------------------
yeah,I like cookie
www.recipeshow.org