Hello all,
i have a random number generator to generate a random number from 1 to 26 (Dim intrandom As Integer = Int(Rnd() * 26) + 1) and an array of pic boxes (Dim picarray(25) As PictureBox). i was wondering how to make the pic boxes visible (theyre visible.false at launch) according to the random number. for example pretty much a shortened version of:
if intrandom=1 then
picbox1.visible=true
elseif intrandom=2 then
picbox2.visible=true
etc., etc.
im a little confused on for loops. thanks!
i have a random number generator to generate a random number from 1 to 26 (Dim intrandom As Integer = Int(Rnd() * 26) + 1) and an array of pic boxes (Dim picarray(25) As PictureBox). i was wondering how to make the pic boxes visible (theyre visible.false at launch) according to the random number. for example pretty much a shortened version of:
if intrandom=1 then
picbox1.visible=true
elseif intrandom=2 then
picbox2.visible=true
etc., etc.
im a little confused on for loops. thanks!