NEED BIG HELP IN VB5!!! Picture Library 
Author Message
 NEED BIG HELP IN VB5!!! Picture Library

Hi,
Let's say that I have a form with 4 picture boxes and 4 labels.  I am
looking for a code which searches a specified directory
(vb\graphics\icons\arrows\*.ico) and puts the 4 first images in the
picture boxes, sort to form a library and also put the path in the label
below.  When the user click next, it takes the 4 next images and puts it
in the picture boxes with the path again below.
So, does anyone know how to do this with VB5 pro?

Thanks,
Nicolas  Blais



Sun, 06 Aug 2000 03:00:00 GMT  
 NEED BIG HELP IN VB5!!! Picture Library

Here is a short-and-to-the-point answer:

Read the help file on the following topics:
    LoadPicture
    Dir
    ChDir
    App.Path

hope that helps!

-GMG

Quote:

>Hi,
>Let's say that I have a form with 4 picture boxes and 4 labels.  I am
>looking for a code which searches a specified directory
>(vb\graphics\icons\arrows\*.ico) and puts the 4 first images in the
>picture boxes, sort to form a library and also put the path in the label
>below.  When the user click next, it takes the 4 next images and puts it
>in the picture boxes with the path again below.
>So, does anyone know how to do this with VB5 pro?

>Thanks,
>Nicolas  Blais



Sun, 06 Aug 2000 03:00:00 GMT  
 NEED BIG HELP IN VB5!!! Picture Library

This is a short and to-the-point answer :)

Assuming that Picture1 is the PictureBox to display the picture and that
Label(0 to 3) are the arrayed-control to display the picture filename:

Declaration
 Dim PublicIndex As Integer, Used(1 to 4) As Boolean  

Private Sub CommandOPEN ()
 Dim i : CommonDialog1.Action = 1
 For i = 1 to 4
  If Used(i) = False Then
  Set ImageList1.ListImages(i).Picture_
         = LoadPicture(CommonDialog1.Filename)
  Label(i).Caption = CommonDialog1.Filename
  Used(i) = True
  Exit Sub
 Next i
MsgBox "All spaces are used. Remove one picture blablabla..."
End Sub

Private Sub Label_Click (Index As Integer)
 Picture1.Picture = ImageList1.ListImages(Index + 1).Picture
 PublicIndex = Index + 1
End Sub

Private Sub CommandREMOVE ()
  'Assuming that the user clicked on the label corresponding to the
picture to be removed
 Set ImageList1.ListImages(PublicIndex).Picture = LoadPicture("")
 Used(PublicIndex) = False
 Label(PublicIndex) = ""
End Sub

If it doesn't work, please E-Mail me that I can know it. Thank!

Quote:

> Hi,
> Let's say that I have a form with 4 picture boxes and 4 labels.  I am
> looking for a code which searches a specified directory
> (vb\graphics\icons\arrows\*.ico) and puts the 4 first images in the
> picture boxes, sort to form a library and also put the path in the label
> below.  When the user click next, it takes the 4 next images and puts it
> in the picture boxes with the path again below.
> So, does anyone know how to do this with VB5 pro?

> Thanks,
> Nicolas  Blais



Tue, 08 Aug 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. NEED BIG HELP IN VB5!!! Picture Library

2. NEED BIG HELP IN VB5!!! Picture Library

3. Need big help for big problem

4. {Need Help Big Project Need Help}

5. Help! Big Picture Problem

6. *** Bigger Picture *** Please help.

7. Moving Pictures?!!!!!!!!! Need help to move a picture

8. Need VB5 Error/Message Logging Library or Control w/source

9. Big Help Needed

10. Big Help needed

11. newbie needs big help

12. Newbie needs Big Time Help!!!

 

 
Powered by phpBB® Forum Software