1

In my application I have used the System Date Time format at all the places. Currently, If user has changed the system date time format in his PC, my application does not know about that changes unless and until restart the application. Is there any way like windows messages or events which I can use in my application and changed the current date time format in running the application.

Currently I have used the below code to get the current system date time.

string currentDateTimeFormat = CultureInfo.CurrentUICulture.DateTimeFormat.ShortDatePattern;

Thanks, Hiren Lad

Hiren Lad
  • 55
  • 5
  • Give [this answer](https://stackoverflow.com/questions/4711555/how-to-receive-event-when-user-changes-systems-culture#4711600) a look. – Handbag Crab Sep 19 '18 at 11:01
  • Just out of interest: what would be a use-case for this? I mean, how often would a user change it's systems date/time/country/etc.? And how often would this lead into problems regarding a running application? – nilsK Sep 19 '18 at 11:05
  • 1
    Thanks Stuartd,SystemEvents.UserPreferenceChanged event is worked for me. – Hiren Lad Sep 19 '18 at 11:07

0 Answers0