S
Steven Smith
This piece of code handles the selection & deselection of
main menu items and serves this purpose well although I'm
not convinced this is the most effective way to do it as
it seems a bit long winded. Perhaps theres a quicker,
easier & shorter method to code this. any suggestions
would be appreciated as always
///
Private Sub DisplayRocketMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) _
Handles DisplayRocketMenuItem.Click
Static tRocketHideShow As Boolean
tRocketHideShow = Not tRocketHideShow
If tRocketHideShow = True Then
Me.DisplayRocketMenuItem.Checked = True
Me.IdRocketLabel.Visible = True
Me.RocketPictureBox.Visible = True
Else
Me.DisplayRocketMenuItem.Checked = False
Me.IdRocketLabel.Visible = False
Me.RocketPictureBox.Visible = False
End If
End Sub
Private Sub DisplayCarsMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) _
Handles DisplayCarsMenuItem.Click
Static tCarsHideShow As Boolean
tCarsHideShow = Not tCarsHideShow
If tCarsHideShow = True Then
Me.DisplayCarsMenuItem.Checked = True
Me.IdCarsLabel.Visible = True
Me.CarsPictureBox.Visible = True
Else
Me.DisplayCarsMenuItem.Checked = False
Me.IdCarsLabel.Visible = False
Me.CarsPictureBox.Visible = False
End If
End Sub
///
Regards Steve...
main menu items and serves this purpose well although I'm
not convinced this is the most effective way to do it as
it seems a bit long winded. Perhaps theres a quicker,
easier & shorter method to code this. any suggestions
would be appreciated as always
///
Private Sub DisplayRocketMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) _
Handles DisplayRocketMenuItem.Click
Static tRocketHideShow As Boolean
tRocketHideShow = Not tRocketHideShow
If tRocketHideShow = True Then
Me.DisplayRocketMenuItem.Checked = True
Me.IdRocketLabel.Visible = True
Me.RocketPictureBox.Visible = True
Else
Me.DisplayRocketMenuItem.Checked = False
Me.IdRocketLabel.Visible = False
Me.RocketPictureBox.Visible = False
End If
End Sub
Private Sub DisplayCarsMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) _
Handles DisplayCarsMenuItem.Click
Static tCarsHideShow As Boolean
tCarsHideShow = Not tCarsHideShow
If tCarsHideShow = True Then
Me.DisplayCarsMenuItem.Checked = True
Me.IdCarsLabel.Visible = True
Me.CarsPictureBox.Visible = True
Else
Me.DisplayCarsMenuItem.Checked = False
Me.IdCarsLabel.Visible = False
Me.CarsPictureBox.Visible = False
End If
End Sub
///
Regards Steve...