文本框和时间的问题,如何正确使用SYSTEMTIME [英] problem with textbox and time, how to use SYSTEMTIME properly
本文介绍了文本框和时间的问题,如何正确使用SYSTEMTIME的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,我的程序有问题.我做了按钮和文本框.我想在按钮单击后在文本框中显示实际小时(仅小时).
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!
推荐答案
如果这是托管代码,只需设置文本框的Text
属性=st.wHour
.
If this is managed code, simply set theText
property of the textbox =st.wHour
.
这篇关于文本框和时间的问题,如何正确使用SYSTEMTIME的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文