Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.