Advertisement
ssoni

luca.vb

Apr 27th, 2022
1,564
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.13 KB | None | 0 0
  1. Public Class Form1
  2.     Public lucas(5) As PictureBox
  3.     Private Sub btnHide_Click(sender As Object, e As EventArgs) Handles btnHide.Click
  4.         Dim x As Integer
  5.  
  6.         For x = 0 To lucas.Length - 1
  7.             lucas(x).Visible = False
  8.         Next
  9.  
  10.         btnHide.Enabled = False
  11.         btnShow.Enabled = True
  12.     End Sub
  13.  
  14.     Private Sub btnShow_Click(sender As Object, e As EventArgs) Handles btnShow.Click
  15.         Dim x As Integer
  16.  
  17.         For x = 0 To lucas.Length - 1
  18.             lucas(x).Visible = True
  19.         Next
  20.  
  21.         btnShow.Enabled = False
  22.         btnHide.Enabled = True
  23.     End Sub
  24.  
  25.     Private Sub PictureBoxALL_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click, PictureBox2.Click, PictureBox3.Click, PictureBox4.Click, PictureBox5.Click
  26.         Dim p As PictureBox
  27.         p = DirectCast(sender, PictureBox)
  28.         p.Visible = False
  29.  
  30.         btnShow.Enabled = True
  31.     End Sub
  32.  
  33.     Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  34.         lucas = {PictureBox1, PictureBox2, PictureBox3, PictureBox4, PictureBox5, PictureBox6}
  35.     End Sub
  36. End Class
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement