Hello,
I would like to display result in form window. The result is changes every 5 seconds. The form is only close when i stop program.

I am using console application in visual c++ 2008. Anybody could help me, how can i display data in form view when i use console application.

Thanks

Recommended Answers

All 6 Replies

Write a Windows Form application and problem solved.

I am using console application. I just want to display my final result with a small form window. There is no need any button. when i close the program, then i will close. I could able to show my result with messegebox. but problem is, it have button and every time need to press button and then it execute next. I already mentioned, i used a loop and every 5 seconds, the result is changed. Could anybody tell me, what is easiest way to solved the problem.

Thanks

I am using console application. I just want to display my final result with a small form window. There is no need any button. when i close the program, then i will close. I could able to show my result with messegebox. but problem is, it have button and every time need to press button and then it execute next. I already mentioned, i used a loop and every 5 seconds, the result is changed. Could anybody tell me, what is easiest way to solved the problem.

Thanks

You can't make a window except message box if its not a Windows GUI program.

Okay, could anybody tell me, How to convert console application program to windows GUI program in visual c++? Please write step by step procedure for convertion.

Thanks in advance.

AFAIK if you do happen to make that form, it will stop responding as it will be inside a loop (correct me if I'm wrong). You can do the following:

1. Use Asynchronous timer for painting text on form.
2. Use a separate thread for the form & change it's contents(See Tails' link above).
3. Design separate project form & build it's exe. Pass arguments to this exe from you command-line program using either system()[Bad] or ShellExecute()[Better]

Hope that helps.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.