creating a c# windows program
 
home | 163 | 202 | 244 | 253 | 355   .   courses | advisees | faq | honesty | schedule   .   webHelp | unixHelp | c*Help | asmHelp

   
 0. Translate algorithm into C#
  1. Open Microsoft Visual Studio
    - Click on the desktop icon   OR   Click Start menu and find
  2. New Project / C# / Windows Forms Application
    - Enter Name for Project [HelloWorld] / ok     * Note location and change if needed!!
  3. visual studio
  4. Add a control! (a button)


  5. visual studio
  6. Write Code that Responds to a ButtonClick


  7. visual studio
          Public Class Form1
          
             Private Sub Button1_Click(ByVal sender As System.Object, _
                                       ByVal e As System.EventArgs) _
                                       Handles Button1.Click
                MessageBox.Show("Hello!", "HelloCaption")
             End Sub
          End Class 

  8. Build / Build helloWorld compiles the program
    - If no syntax errors, message on status bar "Build Succeeded"
    - 'Error List' window opens at bottom if there are syntax errors

  9.   Only use "SAVE ALL" when saving your project!


  10. Executing your newly compiled code:
    - Ctrl-F5 runs the code NODEBUG (to add button: 'Tools/Customize')
    - Debug / Start Debugging - executes the code
  11. Check now for LOGIC ERRORS