document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. Public Class Form1
  2.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  3.         txtDay1.Text = Format(Date.Today, "MM/dd/yyyy")
  4.         txtDay2.Text = Format(Date.Today, "MM/dd/yyyy")
  5.     End Sub
  6.  
  7.     Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
  8.         Dim Text1, Char1, i As Integer
  9.         Char1 = 0
  10.         Text1 = Len(txtSentense.Text)
  11.         For i = 0 To Text1
  12.             txtSentense.Focus()
  13.             txtSentense.SelectionStart = i
  14.             txtSentense.SelectionLength = 1
  15.             If txtSentense.SelectedText = txtChar.Text Then
  16.                 Char1 = Char1 + 1 \'
  17.             End If
  18.         Next
  19.         lblDisplay.Text = "You have " & Char1 & " Character " & txtChar.Text
  20.     End Sub
  21.  
  22.     Private Sub btnGet_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGet.Click
  23.         Dim Array1() As String
  24.         Array1 = Split(txtParagraph.Text, " ")
  25.         Dim FirstWord As String
  26.         FirstWord = Array1(0)
  27.         lbl1stWord.Text = FirstWord
  28.     End Sub
  29.  
  30.     Private Sub btnSortAscending_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSortAscending.Click
  31.         Dim Array1() As String
  32.         Array1 = Split(txtSortSentense1.Text, " ")
  33.         System.Array.Sort(Of String)(Array1)
  34.         Dim value As String
  35.         Dim value1 As String = ""
  36.         For Each value In Array1
  37.             value1 = value1 + " " + value & vbCrLf
  38.         Next
  39.         txtSort.Text = value1
  40.     End Sub
  41.  
  42.     Private Sub btnDays_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDays.Click
  43.         Dim d1 As DateTime = Convert.ToDateTime(txtDay1.Text)
  44.         Dim d2 As DateTime = Convert.ToDateTime(txtDay2.Text)
  45.         Dim t1 As TimeSpan = d2 - d1
  46.         lblDays.Text = t1.Days & " Days"
  47.     End Sub
  48. End Class
');