1 / 7

Assignment 3 help

Assignment 3 help. Dr. John Abraham Professor UTPA. Declaring variables. Use Option Explicit Dim fName As String fName = “John” fName = textBox1.text. Reading and Writing Text Boxes. We enter data into text boxes. What is entered is text, even though a number was typed.

kaylee
Download Presentation

Assignment 3 help

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Assignment 3 help Dr. John Abraham Professor UTPA

  2. Declaring variables • Use Option Explicit • Dim fName As String • fName = “John” • fName = textBox1.text

  3. Reading and Writing Text Boxes • We enter data into text boxes. • What is entered is text, even though a number was typed. • Data entered as text must be converted to appropriate type. • Option strict is used when implicit conversions need to be controlled.

  4. Conversion functions • Ways to convert to an integer. • Temp = CInt(expr) • Temp = Convert.ToInt32(expr) • Temp = Int(“1341”) • Temp = Integer.parse(“1341”) • Write to a textbox after converting to text • TextBox1.Text = Convert.ToString(1345.55)

  5. Output • Console.Writeline(“The grades are {0}, {1} and {2}.”, gr1, gr2, gr3) • The values of the variables will be substituted of {0},{2} and{3} ;all other characters within the “ “ will appear exactly.

  6. Formatted output • String.Format("{0:C}", dblMonthlyPayment) • C stands for currency with $ supplied. • output &= CDbl(begBal).ToString("0,000,000.00") & vbTab

  7. Message Box • Three parameters for Message Box • Others: messageBoxIcon.Exclamation • MessageBoxIcon.Question • MessageBoxIcon.Error

More Related