Click here to Skip to main content
15,895,871 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How do I Parse the Serial Data Recieved from the Serial Port Pin
KingsGambit25-Mar-10 18:33
KingsGambit25-Mar-10 18:33 
GeneralRe: How do I Parse the Serial Data Recieved from the Serial Port Pin
Jimmie Sypolt25-Mar-10 20:15
Jimmie Sypolt25-Mar-10 20:15 
GeneralRe: How do I Parse the Serial Data Recieved from the Serial Port Pin
KingsGambit25-Mar-10 20:36
KingsGambit25-Mar-10 20:36 
QuestionRe: How do I Parse the Serial Data Recieved from the Serial Port Pin
David Crow26-Mar-10 4:57
David Crow26-Mar-10 4:57 
Questionconstructor and destructor [modified] Pin
zakria8125-Mar-10 15:43
zakria8125-Mar-10 15:43 
AnswerRe: constructor and destructor Pin
hanq_3891013025-Mar-10 16:51
hanq_3891013025-Mar-10 16:51 
AnswerRe: constructor and destructor Pin
David Crow26-Mar-10 4:59
David Crow26-Mar-10 4:59 
QuestionDisplay current time as Label control text Pin
Lucidation25-Mar-10 12:14
Lucidation25-Mar-10 12:14 
I'm almost brand new to C++ so I'm hoping someone can help me out. I'm creating a Windows Form application, and I want to display the current time in place of some static text I was using as one of my Label controls. I've spent some time poking around and I think I'm missing something basic.

I was trying something like this:
this->label1->Text = System::DateTime::Now;


and something a little more complexe like this:
this->label1->Text = (System::DateTime::Now.ToString("T"));


But no matter how I manipulate the line, either the code editor or the design editor within Visual Basic Studio barks at me.

So can someone help me out here and let me know what I'm missing? My goal is to just have something like "5:11:45 PM" show as my Label control when the form is displayed.

Thanks!
AnswerRe: Display current time as Label control text Pin
Peter_in_278025-Mar-10 16:23
professionalPeter_in_278025-Mar-10 16:23 
GeneralRe: Display current time as Label control text Pin
loyal ginger25-Mar-10 18:10
loyal ginger25-Mar-10 18:10 
AnswerRe: Display current time as Label control text Pin
BIJU Manjeri25-Mar-10 18:00
BIJU Manjeri25-Mar-10 18:00 
AnswerRe: Display current time as Label control text Pin
loyal ginger25-Mar-10 18:15
loyal ginger25-Mar-10 18:15 
GeneralRe: Display current time as Label control text Pin
Cool_Dev26-Mar-10 3:35
Cool_Dev26-Mar-10 3:35 
GeneralRe: Display current time as Label control text Pin
Lucidation26-Mar-10 5:31
Lucidation26-Mar-10 5:31 
QuestionHow to create database & tables on another machine?? Pin
Ed K25-Mar-10 9:50
Ed K25-Mar-10 9:50 
QuestionRe: How to create database & tables on another machine?? Pin
David Crow25-Mar-10 10:46
David Crow25-Mar-10 10:46 
AnswerRe: How to create database & tables on another machine?? Pin
Ed K25-Mar-10 15:20
Ed K25-Mar-10 15:20 
QuestionHow can I get VS 2008 to generate all the classes a control needs? Pin
Interrobang25-Mar-10 9:35
Interrobang25-Mar-10 9:35 
Questionvector sort method Pin
b-rad31125-Mar-10 9:13
b-rad31125-Mar-10 9:13 
AnswerRe: vector sort method Pin
Maximilien25-Mar-10 9:37
Maximilien25-Mar-10 9:37 
GeneralRe: vector sort method Pin
Luc Pattyn25-Mar-10 10:19
sitebuilderLuc Pattyn25-Mar-10 10:19 
GeneralRe: vector sort method Pin
Maximilien25-Mar-10 10:34
Maximilien25-Mar-10 10:34 
GeneralRe: vector sort method Pin
Luc Pattyn25-Mar-10 10:36
sitebuilderLuc Pattyn25-Mar-10 10:36 
QuestionProgress Meter (MFC) [modified] Pin
Software200725-Mar-10 6:41
Software200725-Mar-10 6:41 
AnswerRe: Progress Meter (MFC) Pin
CPallini25-Mar-10 6:58
mveCPallini25-Mar-10 6:58 

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.