Array of pictures - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Array of pictures

leekeng81leekeng81 Posts: 27Member
I have 9 pictures.. and how can I make the array of pictures? can someone help? Thanks!!!

Comments

  • PavlinIIPavlinII Posts: 404Member
    : I have 9 pictures.. and how can I make the array of pictures? can someone help? Thanks!!!
    :
    Hi, here is part of simple program. It has 1 picture box and 9 pictures on drive C called pic1.jpg, pic2.jpg... pic8.jpg..

    [code]Private picArr(0 To 8) As IPictureDisp

    Private Sub Form_Load()
    Dim i As Integer
    For i = 0 To 8
    Set picArr(i) = LoadPicture("C:pic" & i & ".jpg")
    Next i
    End Sub

    Private Sub Picture1_Click()
    Static LastIndex As Integer
    LastIndex = (LastIndex + 1) Mod 9
    Picture1.Picture = picArr(LastIndex)
    End Sub[/code]
    On Form_Load is the field of pictures filled and when you click the picture box, the next image i shown..
    It's not very nice way how to work with pictures but for illustration (It's quite slow and memory wasting)



    [blue][b][italic][size=4]P[/size]avlin [size=4]II[/italic][/size][/b][/blue]

    [purple]Don't take life too seriously anyway you won't escape alive from it![/purple]


Sign In or Register to comment.