NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

Private mYear(6) As Integer
Private mAddress(6) As String
Private Sub DisplayArray(ByVal year() As Integer, ByVal adress() As String)
'Write code to display both arrays in the correct list boxes
For i As Integer = 0 To year.Length - 1
yearListBox.Items.Add(year(i))
Next
For i As Integer = 0 To adress.Length - 1
addressListBox.Items.Add(adress(i))
Next
End Sub
Private Sub sortForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
mYear(0) = 1942
mAddress(0) = "215 Market Place"
mYear(1) = 1935
mAddress(1) = "1151 Rhinehart Court"
mYear(2) = 1963
mAddress(2) = "810 Maple Ave."
mYear(3) = 1977
mAddress(3) = "44 Templar Street"
mYear(4) = 1955
mAddress(4) = "226 Morrison Ave."
mYear(5) = 1981
mAddress(5) = "26 Fourth Ave."
mYear(6) = 1973
mAddress(6) = "8055 Leopard Stripe Lane"

'Because you'll using two different buttons to populate the listboxes,
'put that process in an independent procedure
End Sub

Private Sub showStartButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles showStartButton.Click
'Call your independent procedure DisplayArray()
DisplayArray(mYear, mAddress)
sortButton.Enabled = True
showChangeButton.Enabled = True
End Sub
Private Sub sortarrays(ByVal year As Integer, ByVal adress As String)


End Sub
Private Sub sortButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles sortButton.Click
'Sort the parallel arrays using a Bubble Sort
Dim pick, compare, temp As Integer
Dim othertemp As String
Dim lastSub As Integer = mYear.Length - 1
For pick = 0 To lastSub - 1
For compare = pick + 1 To lastSub
If mYear(compare) < mYear(pick) Then
temp = mYear(compare)
mYear(compare) = mYear(pick)
mYear(pick) = temp
othertemp = mAddress(compare)
mAddress(compare) = mAddress(pick)
mAddress(pick) = othertemp
End If
Next compare
Next pick

End Sub

Private Sub showChangeButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles showChangeButton.Click
'Call your independent procedure DisplayArray()
yearListBox.Items.Clear()
addressListBox.Items.Clear()
For i As Integer = 0 To mYear.Length - 1
yearListBox.Items.Add(mYear(i))
Next
For i As Integer = 0 To mAddress.Length - 1
addressListBox.Items.Add(mAddress(i))
Next
End Sub
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.