Pages

Monday, November 23, 2009

Monday, November 16, 2009

IsNumeric function in C# equivalent to VB6 IsNumeric() By Praveen P R

// C# .NET
//Check Value if numeric
public static bool IsNumeric(object Expression)
{
bool isNum;
double retNum;
isNum = Double.TryParse(Convert.ToString(Expression), System.Globalization.NumberStyles.Any, System.Globalization.NumberFormatInfo.InvariantInfo, out retNum);
return isNum;
}
http://prpraveen.blogspot.com/

Thursday, November 12, 2009

Focus to next Control in winform on Enter Key Press C# By Praveen PR

Step 1.
//Add the funtion in any common class (static class) so the you can access if from any form you added

//Send Focus to next Control in Form
public static void sendTab(Keys sendKey, object sender)
{
if (sendKey == Keys.Enter)
{
SendKeys.Send("{TAB}");
}
else if (sendKey == Keys.Right)
{
//if (sender.GetType().Name != "DateTimePicker")
//{
// SendKeys.Send("{TAB}");
//}