CODE: Create a program than joins and displays strings. Submit via D2L.
1. Interface (GUI) when program is started.
2. Running the program, after data is input into textboxes.
3. After pressing "Join Strings" - see output in txtOut. Note spacing.
4. After clearing, entering new data in textBoxes and clicking button.
5. After clearing, entering new data in textBoxes and clicking button. Space?
6. Solution Explorer with form renamed.
7. Partial code with comments.
1. Create a Visual C# project: Windows Form Application
- name the project 'CODE'.
- browse to location to save it (desktop highly recommended)
2. In Solution Explorer
- right click on Form1.cs and rename to 'frmMain.cs'
3. Add THREE buttons and change these properties:
1. change: Name to 'btnClear'
Text to 'Clear'
BackColor to blueish
2. change: Name to 'btnExit'
Text to 'Exit'
BackColor to reddish
3. change: Name to 'btnJoin'
Text to 'Join Strings'
BackColor to greenish
4. Add THREE textboxes and change these properties:
1. change: Name to 'txtIn1'
2. change: Name to 'txtIn2'
3. change: Name to 'txtOut'
MultiLine to True
TextAlign to Center
ReadOnly to True
Don't write code until you have everything named properly!!
5. Write code to change Text property of the form to your name at execution time in frmMain_Load
this.Text = "your actual name";
6. Write code for the Click event of each button:
1. btnClear: remove all text from textboxes
- use the Clear() method to clear txtIn1
- use the Clear() method to clear txtIn2
- use the Clear() method to clear txtOut
2. btnExit: exit program
- 'this.Close()' method
3. btnJoin (do ALL these steps - no shortcuts)
- declare THREE local string variables:
'str1', 'str2', and 'strOut'
- store text from txtIn1 into the variable str1
- store text from txtIn2 into the variable str2
- combine str1 + str2 and store in strOut
- display the contents of variables str1, str2 and strOut
and show in txtOut as shown in the images
ex: Bill + Jones = BillJones
ex: 123 + 4567 = 1234567
7. ONLY USE "SAVE ALL"
saving - save all only
do not "move to desktop"
zip entire folder
zip file size
~40k - note: (2017) zip file sizes seem closer to 200k (images increase zip file size!)