How can I change default settings in my application like datetime form

How can I change default settings in my application like datetime form

Page 1 of 1

0 Replies - 1017 Views - Last Post: 02 June 2009 - 02:42 AM Rate Topic: -----

#1 ali bawi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 31-May 09

How can I change default settings in my application like datetime form

Post icon  Posted 02 June 2009 - 02:42 AM

I have 2 problems

1. I want to change my application datetime format and numeric shape by using threading, Plz check below procedure if it's right or not and if you have code to solve my problem, Plz help me

public static void SetDetaultSettings(string Lang,string uDateFormat)
{
CultureInfo vNewCulture = new CultureInfo(Lang);

vNewCulture.DateTimeFormat.ShortDatePattern = uDateFormat;

vNewCulture.DateTimeFormat.DateSeparator = "/";

vNewCulture.DateTimeFormat.ShortTimePattern = "hh:mm"; // add "tt" if you need AM/PM descriptors

vNewCulture.DateTimeFormat.LongTimePattern = "hh:mm:ss";
vNewCulture.NumberFormat.DigitSubstitution = DigitShapes.NativeNational
Thread.CurrentThread.CurrentCulture = vNewCulture;
Thread.CurrentThread.CurrentUICulture = vNewCulture;
}


2. Second problem I want to add new property to TextBox Control like(FieldName, TableName) and make it dll file to use it in my application (windows application, ASP.Net)

Can you help me to built this liberary using C# lang.?

Is This A Good Question/Topic? 0
  • +

Page 1 of 1