Author Topic: Help with Wiimote Photo Gallery  (Read 2849 times)

Offline Tails

  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
on: March 24, 2009, 04:50:39 PM
I'm trying to code a photo gallery application which will be used with Johnny Lee's Wii remote whiteboard.  I'm writing the application in VB>NET (2005) and am trying to produce a list of images so that users can select one and have it displayed in a picture box.

I'm a little confused as to which is the best way to produce a list of thumbnail images (perhaps 100 wide with the height scaled appropriately) with the file name beside it?  Basically, I want the user to be able to add files to the list using the open file dialogue (this part I've figured out).  I initially thought I could use the imagelist component in VB to produce such a list but I haven't made much progress with that.

Any advice would be appreciated :-)

PS The code I'm attempting to use is below-

Dim strFileName As String = ""
        Dim path As String = "C:\"

        OpenFD.InitialDirectory = "C:\"
        OpenFD.Title = "Please select images"
        OpenFD.FileName = ""
        OpenFD.Filter = "JPEG Images (*.jpg,*.jpeg)|*.jpg;*.jpeg|Gif Images (*.gif)|*.gif|Bitmaps (*.bmp)|*.bmp"
        OpenFD.ShowDialog()
        strFileName = OpenFD.FileName
        path = OpenFD.FileName

        Dim MyImageList As New ImageList
        MyImageList.Images.Add(Image.FromFile(path))
        ListBox1.Items.Add(Image.FromFile(path))