| | |
How to make windows form from c++ code (GUI)
![]() |
•
•
Join Date: Jul 2006
Posts: 1
Reputation:
Solved Threads: 0
Hello everybody,
I'm totally newbie with c++ language.
I'm using Visual C++ 2005 Express Edition.
I like to make a working GUI with my first c++ code.
My question is:
How to insert this code to Windows Forms (GUI) that contain:
1. Press "Button" to randomly generate the number from the code
2. "TextBox" to display the result from generated number.
I hope someone will provide me the full code that i can compile it here.
Here is the code:
Tahnks for any suggestion and help.
I'm totally newbie with c++ language.
I'm using Visual C++ 2005 Express Edition.
I like to make a working GUI with my first c++ code.
My question is:
How to insert this code to Windows Forms (GUI) that contain:
1. Press "Button" to randomly generate the number from the code
2. "TextBox" to display the result from generated number.
I hope someone will provide me the full code that i can compile it here.
Here is the code:
C++ Syntax (Toggle Plain Text)
#include <cstdlib> #include <ctime> #include <iostream> using std::cout; int main( ) { // srand will set a random starting point for rand() // We use the time as a seed, as it's always changing srand( ( unsigned )time( 0 ) ); // We generate a random number between 0 and 4013 // 4013 because ( 22423 * 4013 => 89983499 and // 89983499 + 10016486 => 99999985 - our max value ) int randomKey = rand() % 4013; // Output the generated key and don't immediately close the command prompt window cout << "Your random key is: ABC" << ( 10016486 + ( randomKey * 22423 ) ) << "\n"; system( "PAUSE" ); return 0; }
Tahnks for any suggestion and help.
•
•
Join Date: Jul 2006
Posts: 56
Reputation:
Solved Threads: 3
Making GUIs in C++ is rather complicated. I suggest you try to download a tutorial about it. There are plenty of tutorials about GUI making out there.
If you're willing to pay http://www.experts-exchange.com/Prog..._21902809.html is pretty nice.
http://www.rohitab.com/discuss/lofiv...hp/t11408.html
Excuse me if I sound a bit rude, but next time please google before you post.
Greetz, Eddy
If you're willing to pay http://www.experts-exchange.com/Prog..._21902809.html is pretty nice.
http://www.rohitab.com/discuss/lofiv...hp/t11408.html
Excuse me if I sound a bit rude, but next time please google before you post.
Greetz, Eddy
•
•
Join Date: Jul 2006
Posts: 7
Reputation:
Solved Threads: 0
hi all
i've downloaded the generic source code from the first link provided by Ancient Dragon.
Sorry if this is really basic, and i dont know what to look up on google to answer my question, but what do i do with the files? I'm guessing i have to put them somewhere in Dev C++ program but i dont know where.
Any help would be great
cheers
i've downloaded the generic source code from the first link provided by Ancient Dragon.
Sorry if this is really basic, and i dont know what to look up on google to answer my question, but what do i do with the files? I'm guessing i have to put them somewhere in Dev C++ program but i dont know where.
Any help would be great
cheers
Last edited by Simon268; Jul 21st, 2006 at 9:04 am.
Just getting the source code copied from any website is not much of an achievement, it would be better if you do a reality check and start learning C++ from ground up , from beginner to advanced and you will automatically figure out the answers to your questions.
Sorry if i have been rude but its best to have strong basics than just jumping in the fray not knowing wat the hell is going on.
Bye.
Sorry if i have been rude but its best to have strong basics than just jumping in the fray not knowing wat the hell is going on.
Bye.
I don't accept change; I don't deserve to live.
Hi L33VaNcL33F,
Search for Win32 API tutorials.
This would help:
Good luck.
Search for Win32 API tutorials.
This would help:
C++ Syntax (Toggle Plain Text)
http://www.zeuscmd.com/
Good luck.
![]() |
Similar Threads
- Windows "Machine Code" (IT Professionals' Lounge)
- Make Background Form is Transparent (VB.NET)
- Separating socket code from GUI code (C++)
Other Threads in the C++ Forum
- Previous Thread: function for merging two lists
- Next Thread: Someone who wants to learn C++ with me?
| Thread Tools | Search this Thread |
action api array auto based beginner binary bitmap c++ c/c++ calculator challenge char class classes code coding compile console conversion count createcopyofanyfileinc delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game garbage givemetehcodez graph gui hmenu homeworkhelp homeworkhelper iamthwee ifstream input insert int integer java lib linkedlist linker loop looping loops map math matrix memory multiple news node noob output parameter pointer primenumbersinrange problem program programming project python random read recursion reference rpg sockets string strings temperature template test text text-file tree url variable vector video win32 windows winsock wordfrequency wxwidgets






