7 Replies - 579 Views - Last Post: 02 April 2012 - 01:32 PM Rate Topic: -----

#1 iaman  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 30-March 12

'Images' Is Not A Member Of System.Array HELP

Posted 30 March 2012 - 03:17 PM

I got this error within my code and haven't been able to figure out what is wrong with it, im not sure if im doing this Array Correct that could be the reason just looking for some guidance.

Dim imgPictures() As Image
imgPictures.Add(My.Resources.Red)
imgPictures.Add(My.Resources.Blue)
imgPictures.Add(My.Resources.Black)
imgPictures.Add(My.Resources.Yellow)

Dim imgReel1 As Integer = random.Next(0, imgPictures.Images.Count - 1)
PicBox1.Image = imgPictures.Images(imgReel1)


The problem is with imgPictures.Images that im getting this error message.
Basicly for this program I am trying to create an Array of images and then have them randomise within a PictureBox. I have to do this within an Array but my method above doesn't seem to be working

Is This A Good Question/Topic? 0
  • +

Replies To: 'Images' Is Not A Member Of System.Array HELP

#2 DimitriV  Icon User is offline

  • Don't try to save yourself… the circle is complete
  • member icon

Reputation: 544
  • View blog
  • Posts: 2,632
  • Joined: 24-July 11

Re: 'Images' Is Not A Member Of System.Array HELP

Posted 30 March 2012 - 03:24 PM

Normally I'd just refer to it like so:
PicNox1.Image = imgPictures(imgReel1)
'or
PicNox1.Image = imgPictures.Item(imgReel1)

Was This Post Helpful? 1
  • +
  • -

#3 iaman  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 30-March 12

Re: 'Images' Is Not A Member Of System.Array HELP

Posted 30 March 2012 - 03:31 PM

View PostDimitriV, on 30 March 2012 - 03:24 PM, said:

Normally I'd just refer to it like so:
PicNox1.Image = imgPictures(imgReel1)
'or
PicNox1.Image = imgPictures.Item(imgReel1)


Thanks Mate that worked a treat :D, would you be able to help me with something else? not related to this save me making a new thread
Was This Post Helpful? 0
  • +
  • -

#4 DimitriV  Icon User is offline

  • Don't try to save yourself… the circle is complete
  • member icon

Reputation: 544
  • View blog
  • Posts: 2,632
  • Joined: 24-July 11

Re: 'Images' Is Not A Member Of System.Array HELP

Posted 30 March 2012 - 03:34 PM

I can, but for all sakes it's better to have a separate thread for separate problems as it helps readability and prevents the threads from potentially becoming really cluttered.

WELCOME TO DREAM.IN.CODE! Glad I could help you out :)
edit: spelling mistake fixed

This post has been edited by DimitriV: 30 March 2012 - 03:38 PM

Was This Post Helpful? 0
  • +
  • -

#5 iaman  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 30-March 12

Re: 'Images' Is Not A Member Of System.Array HELP

Posted 30 March 2012 - 03:34 PM

View PostDimitriV, on 30 March 2012 - 03:32 PM, said:

I can, but for all sakes it's better to have a separate thread for separate problems as it helps readability and prevents thre threads from potentially becoming really cluttered.


can I pm you then?, its a simple thing which i don't understand why it aint working
If not ill just create a new thread
Was This Post Helpful? 0
  • +
  • -

#6 DimitriV  Icon User is offline

  • Don't try to save yourself… the circle is complete
  • member icon

Reputation: 544
  • View blog
  • Posts: 2,632
  • Joined: 24-July 11

Re: 'Images' Is Not A Member Of System.Array HELP

Posted 30 March 2012 - 03:38 PM

It's best not to. If, say, I can't help you for whatever reason or my Internet were to drop out suddenly, you'd be left in the dark with nobody to help you. If you posted a thread at least everyone can see your question :)
Was This Post Helpful? 0
  • +
  • -

#7 iaman  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 30-March 12

Re: 'Images' Is Not A Member Of System.Array HELP

Posted 30 March 2012 - 03:39 PM

View PostDimitriV, on 30 March 2012 - 03:38 PM, said:

It's best not to. If, say, I can't help you for whatever reason or my Internet were to drop out suddenly, you'd be left in the dark with nobody to help you. If you posted a thread at least everyone can see your question :)


Ok no problem ill do it now, Thanks for the help much appreciated
Was This Post Helpful? 0
  • +
  • -

#8 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 550
  • View blog
  • Posts: 2,911
  • Joined: 19-May 09

Re: 'Images' Is Not A Member Of System.Array HELP

Posted 02 April 2012 - 01:32 PM

iaman, please stop creating vb.net threads in the vb6 forum, too. :) I'm moving this one.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1