Click here to Skip to main content
15,886,137 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
my question its how to set the system calendar type using c# ? .i found this function from

Kernel32.dll

C++
BOOL SetCalendarInfo(
      _In_  LCID Locale,
      _In_  CALID Calendar,
      _In_  CALTYPE CalType,
      _In_  LPCTSTR lpCalData
    );

but how i used it in c# ?!
Posted
Comments
[no name] 13-Jul-14 18:20pm    
P/Invoke
Eng Abdullah Albishri 13-Jul-14 23:01pm    
How ?
thanks any way
[no name] 14-Jul-14 8:44am    
What do you mean "how"? You P/Invoke it.
Sergey Alexandrovich Kryukov 13-Jul-14 22:21pm    
What is "Calender"? :-)
—SA
Eng Abdullah Albishri 13-Jul-14 23:02pm    
system calender. calender type

1 solution

Well, the function you found, SetCalendarInfo[^], says this in the documentation:
Quote:
This function only affects the user override portion of the calendar settings. It does not set the system defaults.


The real question is WHY are you trying to modify the system calendar type? This is normally frowned upon as changing any system settings will only piss off the user and get your app uninstalled very VERY quickly.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 14-Jul-14 1:47am    
Exactly. 5ed.
—SA
Eng Abdullah Albishri 14-Jul-14 16:01pm    
no my users wants that from me

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900