Click here to Skip to main content
15,921,113 members
Home / Discussions / C#
   

C#

 
GeneralRe: creating a custom editor Pin
KaleoDev12-Jul-07 2:13
KaleoDev12-Jul-07 2:13 
QuestionProblem with Timer object Pin
alashara11-Jul-07 21:22
alashara11-Jul-07 21:22 
AnswerRe: Problem with Timer object Pin
Martin#11-Jul-07 21:32
Martin#11-Jul-07 21:32 
GeneralRe: Problem with Timer object Pin
alashara11-Jul-07 23:13
alashara11-Jul-07 23:13 
GeneralRe: Problem with Timer object [modified] Pin
Martin#11-Jul-07 23:28
Martin#11-Jul-07 23:28 
GeneralRe: Problem with Timer object Pin
Luc Pattyn11-Jul-07 23:54
sitebuilderLuc Pattyn11-Jul-07 23:54 
QuestionDate time format Pin
MarkB77711-Jul-07 21:11
MarkB77711-Jul-07 21:11 
GeneralRe: Date time format Pin
Martin#11-Jul-07 21:38
Martin#11-Jul-07 21:38 
Haven't used that befor, but "kernel32.dll" provides a lot of usefull methods in this topic.
Like:
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
    public struct SystemTime
{
    public short sYear;
    public short sMonth;
    public short sDayOfWeek;
    public short sDay;
    public short sHour;
    public short sMinute;
    public short sSecond;
    public short sMilliSeconds;
}

[System.Runtime.InteropServices.DllImport("kernel32.dll")]
public static extern bool SetLocalTime(ref SystemTime time);

[System.Runtime.InteropServices.DllImport("kernel32.dll")]
public static extern bool GetLocalTime(ref SystemTime time);

Or:
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
    public struct TimeZoneInformation
{
    public int bias;

    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
    public string standardName;

    SystemTime standardDate;

    public int standardBias;

    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
    public string daylightName;

    SystemTime daylightDate;

    public int daylightBias;
}

[DllImport("kernel32.dll", CharSet = CharSet.Auto)]
private static extern bool SetTimeZoneInformation([In] ref TimeZoneInformation lpTimeZoneInformation);

[DllImport("kernel32.dll", CharSet = CharSet.Auto)]
private static extern int GetTimeZoneInformation(out TimeZoneInformation lpTimeZoneInformation);

Maybe you are luky with kernel32?


All the best,

Martin

Questioninheritance Pin
vamsivss11-Jul-07 20:49
vamsivss11-Jul-07 20:49 
AnswerRe: inheritance Pin
Sathesh Sakthivel11-Jul-07 20:53
Sathesh Sakthivel11-Jul-07 20:53 
AnswerRe: inheritance [modified] Pin
Colin Angus Mackay11-Jul-07 22:50
Colin Angus Mackay11-Jul-07 22:50 
GeneralRe: inheritance Pin
ruanr11-Jul-07 23:56
ruanr11-Jul-07 23:56 
GeneralRe: inheritance [modified] Pin
Colin Angus Mackay12-Jul-07 1:02
Colin Angus Mackay12-Jul-07 1:02 
GeneralRe: inheritance Pin
Colin Angus Mackay12-Jul-07 1:06
Colin Angus Mackay12-Jul-07 1:06 
GeneralRe: inheritance Pin
ruanr12-Jul-07 3:26
ruanr12-Jul-07 3:26 
AnswerRe: inheritance Pin
Naga Rajendra Kumar12-Jul-07 1:25
Naga Rajendra Kumar12-Jul-07 1:25 
Questionarrays Pin
vamsivss11-Jul-07 20:46
vamsivss11-Jul-07 20:46 
AnswerRe: arrays Pin
Sathesh Sakthivel11-Jul-07 20:52
Sathesh Sakthivel11-Jul-07 20:52 
AnswerRe: arrays Pin
ruanr11-Jul-07 20:55
ruanr11-Jul-07 20:55 
GeneralRe: arrays [modified] Pin
Martin#11-Jul-07 20:59
Martin#11-Jul-07 20:59 
GeneralRe: arrays Pin
Sathesh Sakthivel11-Jul-07 21:04
Sathesh Sakthivel11-Jul-07 21:04 
JokeRe: arrays Pin
Luc Pattyn11-Jul-07 23:58
sitebuilderLuc Pattyn11-Jul-07 23:58 
JokeRe: arrays [modified] Pin
Martin#12-Jul-07 0:10
Martin#12-Jul-07 0:10 
AnswerRe: arrays Pin
MarkB77711-Jul-07 21:16
MarkB77711-Jul-07 21:16 
QuestionCOM-Ports Pin
roiter11-Jul-07 20:06
roiter11-Jul-07 20:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.