• 0

Programming in visual c#


Question

Hello to you all

i need to make a program that shutdown the PC in a specified time .........so pleas help me , i don't know how to get the time (hours,minutes and seconds ) from windows ....................

Thanx to you all....................................................

Link to comment
Share on other sites

Recommended Posts

  • 0
hi soumyasch look i am a beginner look will this code display the time or not.........

private void timer3_Tick(object sender, EventArgs e)
		{
					   txetbox1.text= convert.tostring(timer2.tick);
	   }

???

No, it won't. Because you are using timer3 to track the timer ticks (which I assume you set to be 1 second apart). So, timer2 won't have any information you need. Plus, the timer doesn't keep a count of ticks elapsed, you have to do that yourself. You could use a separate variable and increment it at every tick event. Or use the tag field of the timer.

Link to comment
Share on other sites

  • 0

You should start with the basics. This stuff is a bit too much for a first time experience with C#. Some necessay paces can't be avoided.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.