BTM 380 Introduction to Application Development C sharp Coding
Classes - Midterm notes Concordia University
C sharp Coding Classes
General
Open Microsoft Visual Studio, choose c# as the language and Windows Forms app.
• You can launch C# projects by either double-clicking on solution file
(extension .sln) or project file (extension .proj)
Development Methodologies
,Controls
Forms have controls. Here are the main types of controls:
Textboxes
lets user enter text on a
form Labels
displays text on a form
Buttons
, initiates form processing when clicked
Listboxes
Checkboxes
Radio Buttons
Properties
To set appearance of the control / can be set by moving focus on the target control
and changing property values in the properties window
Common properties:
Name
Text
Backcol
or Font
Enabled
Visible
Naming Conventions
Control names are prefixed.
Form: frm (eg:
frmMyForm) Textbox: txt
(txtFirstName) Label (lbl)
Button (btn)
Checkbox (chk)
Radio button (rad)
Camel notation: starts with small letter, and the first letter of each subsequent
word is
capitalised
eg: frmMortgageCalculator
Properties Window
Access through "View," "properties window" or
F4 key Change Form visual title: under "Text"
Internal Name: "(Name)"
Toolbox
Classes - Midterm notes Concordia University
C sharp Coding Classes
General
Open Microsoft Visual Studio, choose c# as the language and Windows Forms app.
• You can launch C# projects by either double-clicking on solution file
(extension .sln) or project file (extension .proj)
Development Methodologies
,Controls
Forms have controls. Here are the main types of controls:
Textboxes
lets user enter text on a
form Labels
displays text on a form
Buttons
, initiates form processing when clicked
Listboxes
Checkboxes
Radio Buttons
Properties
To set appearance of the control / can be set by moving focus on the target control
and changing property values in the properties window
Common properties:
Name
Text
Backcol
or Font
Enabled
Visible
Naming Conventions
Control names are prefixed.
Form: frm (eg:
frmMyForm) Textbox: txt
(txtFirstName) Label (lbl)
Button (btn)
Checkbox (chk)
Radio button (rad)
Camel notation: starts with small letter, and the first letter of each subsequent
word is
capitalised
eg: frmMortgageCalculator
Properties Window
Access through "View," "properties window" or
F4 key Change Form visual title: under "Text"
Internal Name: "(Name)"
Toolbox