I have two forms. First form has 5 buttons, when all 5 buttons are clicked they should display another form, however depending on which button is clicked different text and images are displayed through a select case statement. However I am not sure what links this to the first form to display the right text and image. Here is my code for the second form:
Imports System.IO
Public Class frmCandidate
Inherits System.Windows.Forms.Form
Public Shared Pic As PictureBox
Dim myStream As Stream
Private Sub frmCan_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated
Dim count As Integer
Class1.strName(0) = "Dog"
Class1.strName(1) = "Alien"
Class1.strName(2) = "Lobster"
Class1.strName(3) = "smurf"
Class1.strName(4) = "yellowstar"
Me.Label1.Text = Class1.strName(count)
Select Case Class1.strName(count)
Case "Dog"
Me.PictureBox1.Image = My.Resources.dog
myStream = File.Open("C:\dog.txt", FileMode.OpenOrCreate)
Case "Alien"
Me.PictureBox1.Image = My.Resources.greenalien
Case "Lobster"
Me.PictureBox1.Image = My.Resources.lobster
Case "Smurf"
Me.PictureBox1.Image = My.Resources.smurf
Case "Star"
Me.PictureBox1.Image = My.Resources.yellowstar
End Select
End Sub
End Class