Click here to Skip to main content
15,906,947 members
Home / Discussions / C#
   

C#

 
AnswerRe: Need help with a Struct or Class (array) Pin
Guffa18-Dec-05 13:22
Guffa18-Dec-05 13:22 
GeneralRe: Need help with a Struct or Class (array) Pin
[Marc]18-Dec-05 14:32
[Marc]18-Dec-05 14:32 
QuestionHow to add Timer to class in C# ? Pin
Yanshof18-Dec-05 8:44
Yanshof18-Dec-05 8:44 
AnswerRe: How to add Timer to class in C# ? Pin
Andy Brummer18-Dec-05 13:13
sitebuilderAndy Brummer18-Dec-05 13:13 
QuestionNew Combobox Challenge! Pin
SpeBeeTo18-Dec-05 7:21
SpeBeeTo18-Dec-05 7:21 
QuestionHow set new system date and time in .NET Framework? Pin
Andrey_Mark18-Dec-05 4:39
Andrey_Mark18-Dec-05 4:39 
AnswerRe: How set new system date and time in .NET Framework? Pin
Colin Angus Mackay18-Dec-05 5:16
Colin Angus Mackay18-Dec-05 5:16 
GeneralRe: How set new system date and time in .NET Framework? Pin
Andrey_Mark21-Dec-05 8:11
Andrey_Mark21-Dec-05 8:11 
I use following solution in this case:

  public struct SYSTEMTIME {<br />
    public short wYear;<br />
    public short wMonth;<br />
    public short wDayOfWeek;<br />
    public short wDay;<br />
    public short wHour;<br />
    public short wMinute;<br />
    public short wSecond;<br />
    public short wMilliseconds;<br />
  };<br />
<br />
  public sealed class SetSystemTimeUnsafe<br />
  {<br />
<br />
    [DllImport("kernel32", SetLastError = false)]<br />
    private static extern unsafe bool SetSystemTime(SYSTEMTIME* st);<br />
<br />
    public static void Set(DateTime dt)<br />
    {<br />
      unsafe<br />
      {<br />
        SYSTEMTIME st;<br />
        st.wDay = (short)dt.Day;<br />
        st.wDayOfWeek = 0;<br />
        st.wHour = (short)dt.Hour;<br />
        st.wMilliseconds = (short)dt.Millisecond;<br />
        st.wMinute = (short)dt.Minute;<br />
        st.wMonth = (short)dt.Month;<br />
        st.wSecond = (short)dt.Second;<br />
        st.wYear = (short)dt.Year;<br />
        SetSystemTime(&st);<br />
      }<br />
    }<br />
<br />
  }



- - -
QuestionInteract Pin
nc3b18-Dec-05 4:23
nc3b18-Dec-05 4:23 
AnswerRe: Interact Pin
Colin Angus Mackay18-Dec-05 5:11
Colin Angus Mackay18-Dec-05 5:11 
GeneralRe: Interact Pin
nc3b19-Dec-05 7:19
nc3b19-Dec-05 7:19 
QuestionAn object reference is required for the nonstatic field, method, or property Pin
ESTAN18-Dec-05 1:48
ESTAN18-Dec-05 1:48 
AnswerRe: An object reference is required for the nonstatic field, method, or property Pin
S. Senthil Kumar18-Dec-05 2:03
S. Senthil Kumar18-Dec-05 2:03 
GeneralRe: An object reference is required for the nonstatic field, method, or property Pin
ESTAN18-Dec-05 2:06
ESTAN18-Dec-05 2:06 
GeneralRe: An object reference is required for the nonstatic field, method, or property Pin
S. Senthil Kumar18-Dec-05 2:11
S. Senthil Kumar18-Dec-05 2:11 
GeneralRe: An object reference is required for the nonstatic field, method, or property Pin
ESTAN18-Dec-05 2:14
ESTAN18-Dec-05 2:14 
GeneralRe: An object reference is required for the nonstatic field, method, or property Pin
S. Senthil Kumar18-Dec-05 2:22
S. Senthil Kumar18-Dec-05 2:22 
GeneralRe: An object reference is required for the nonstatic field, method, or property Pin
ESTAN18-Dec-05 2:48
ESTAN18-Dec-05 2:48 
GeneralRe: An object reference is required for the nonstatic field, method, or property Pin
S. Senthil Kumar18-Dec-05 2:52
S. Senthil Kumar18-Dec-05 2:52 
AnswerRe: An object reference is required for the nonstatic field, method, or property Pin
ESTAN18-Dec-05 3:06
ESTAN18-Dec-05 3:06 
GeneralRe: An object reference is required for the nonstatic field, method, or property Pin
Guffa18-Dec-05 2:07
Guffa18-Dec-05 2:07 
GeneralRe: An object reference is required for the nonstatic field, method, or property Pin
S. Senthil Kumar18-Dec-05 2:10
S. Senthil Kumar18-Dec-05 2:10 
AnswerRe: An object reference is required for the nonstatic field, method, or property Pin
Guffa18-Dec-05 2:12
Guffa18-Dec-05 2:12 
Question.NET Framework installation Pin
mehrdadc4818-Dec-05 1:42
mehrdadc4818-Dec-05 1:42 
Questionsend structure through socket? Pin
pakFari17-Dec-05 23:42
pakFari17-Dec-05 23:42 

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.