Click here to Skip to main content
15,896,154 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello, i have a problem with my program. i made button and textbox. i want to display in textbox actual hour (only hour) after buttons click.

private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
textBox1->
Clear();
SYSTEMTIME st;
GetSystemTime(&st);
textBox1->Paste("%dnHour",st.wHour);


thats my code. the problem is paste probably. pls help me!
Posted
Comments
Albert Holguin 5-Feb-11 20:31pm    
What class of object is textBox1?

1 solution

If this is managed code, simply set the Text property of the textbox = st.wHour.
 
Share this answer
 

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