Question #38482

write a vc++ program to display the current date and time in status bar
1

Expert's answer

2014-01-21T08:39:40-0500

Answer on Question#38482 - Programming - Other

1) First of all you need to add statusStrip and timer to the main panel.

2) Then add toolStripStatusLabel into statusStrip.

3) The last step is to turn the timer on and set tick event for it.


private: System::Void timer1_Tick(System::Object^ sender, System::EventArgs^ e)
{
    statusStrip1->Items[0]->Text = DateTime::Now.ToShortDateString() + " " +
        DateTime::Now.ToShortTimeString() + ":" + DateTime::Now.Second;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS