Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Basic Stuff

524 views

Published on

Very basic stuff on variables (primitive and non-primitive types) + TextBox.

Published in: Education, Spiritual, Technology
  • Be the first to comment

  • Be the first to like this

Basic Stuff

  1. 1. Variables - Primitive & Non-Primitive types
  2. 2. Primitive and Non-primitive (Object) types <ul><li>Primitive types </li></ul><ul><li>[Declaration] </li></ul><ul><li>Dim x As Integer </li></ul><ul><li>[Usage] </li></ul><ul><li>x = 1 </li></ul>Non-Primitive types [Declaration] Dim y As TextBox [Instantiation] y = new TextBox( ) [Usage] y.Text = &quot;my name&quot; y.Visible = False
  3. 3. Primitive types <ul><li>[Declaration] </li></ul><ul><li>Dim x As Integer </li></ul>
  4. 4. Primitive types <ul><li>[Usage] </li></ul><ul><li>x = 1 </li></ul>
  5. 5. Non-Primitive types <ul><li>[Declaration] </li></ul><ul><li>Dim y As TextBox </li></ul>
  6. 6. Non-Primitive types <ul><li>[Instantiation] </li></ul><ul><li>y = New TextBox( ) </li></ul>
  7. 7. Non-Primitive types <ul><li>[Usage] </li></ul><ul><li>y.Text = &quot;Name&quot; </li></ul>
  8. 8. Primitive and Non-primitive (Object) types <ul><li>Primitive types </li></ul><ul><li>[Declaration] </li></ul><ul><li>Dim x As Integer </li></ul><ul><li>[Usage] </li></ul><ul><li>x = 1 </li></ul><ul><li>Special case: </li></ul><ul><li>String is not primitive but is used like one </li></ul>Non-Primitive types [Declaration] Dim y As TextBox [Instantiation] y = new TextBox( ) [Usage] y.Text = &quot;my name&quot; y.Visible = False
  9. 9. What is TextBox1.Text?
  10. 10. What is TextBox1.Text? <ul><li>TextBox is a Control provided by Microsoft. </li></ul><ul><li>It defines a Class with behaviours, properties and events. </li></ul><ul><li>=> later we shall use VS 2005 to view these behaviours, properties and events. </li></ul>
  11. 11. What is TextBox1.Text? <ul><li>To use the control, we need to declare and instantiate . </li></ul><ul><li>In Form1.Designer.vb: </li></ul>[Declaration] Friend WithEvents TextBox1 As System.Windows.Forms.TextBox [Instantiation] Me.TextBox1 = New System.Windows.Forms.TextBox
  12. 12. What is TextBox1.Text? <ul><li>1) View partial class Form1.Designer.vb </li></ul><ul><li>2) Right click on TextBox in &quot; New System.Windows.Forms. TextBox &quot; </li></ul><ul><li>3) Select Go To Definition </li></ul>
  13. 13. What is TextBox1.Text? behaviours / methods properties events TextBox1.Text

×