DOUBLE PTS combo box to populate six picture boxes.

*need quick!*

Trying to figure this out and learn in the process.

I have a combo box (cmbTime) with a populated list of jpgs (Cam1-20060224165648-01.jpg) that needs to be displayed in a picture box, however that same file name is also located in six other folders (Cam 1, Cam 2, Cam 4, Cam 6, Cam 7, and Cam 8) using appropiate date selected from another combo box (cmbDate). The six picture boxes are named: pcbCam1, pcbCam2, pcbCam4, pcbCam6, pcbCam7. Can someone help please? I will award double points since I need this quickly and need lots of help! Thank you!!
Kit_Kat111Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PockyMasterCommented:
Can you specify what you want exactly?

Your combobox contains all the pictures you have?
You will select 1 of them and the application needs to select the pictures from the other folders containing the same date as the selected file and show them in the picturebox?
Something like that?
0
Kit_Kat111Author Commented:
actually....
0
Kit_Kat111Author Commented:
ooops...I meant exactly....can you tell I am tired?
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

PockyMasterCommented:
Aaargh..damn mouse.. I typed your complete solution, and then click the awefull backnavigation button on my mouse and lost the whole story.

Well do something like this...create a class containing all your files
create a class containing a single file, exposing FileName and Path

attach the list of fileItem class objects to the datasource of your combobox
set the display member to the FileName

use your files class to get the attached files after you selected a single one
use image objects to load images for them and attach them to your pictureboxes.
0
Kit_Kat111Author Commented:
Whoa...I am just learning this stuff. Plus all my files vary, and are numerous. I really need help coding.......
0
Kit_Kat111Author Commented:
Sorry that I am learning but I have no choice but to ask for help. Thank you for your interest in helping me.

So far this is what I have written up, not much but I am trying.

    Private Sub cmbTime_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbTime.SelectedIndexChanged
        'testing

        If cmbDate.SelectedValue Then
            'error msg
        Else
            Select Case cmbDate.SelectedValue = "February 24, 2006"

            get folder 1 = pcbCam1
              get folder 2 = pcbCam2
              get folder 4 = pcbCam4
              get folder 6 = pcbCam6
              get folder 7 = pcbCam7
              get folder 8 = pcbCam8


                Case cmbDate.SelectedValue = "February 27, 2006"

                Case cmbDate.SelectedValue = "February 28, 2006"


            End Select

        End If



    End Sub
0
Bob LearnedCommented:
Here's a guess:

   Private Sub cmbTime_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles   cmbTime.SelectedIndexChanged

       Dim folder As String = "Cam" & Me.cmbDate.SelectedIndex

       Dim fileName As String = folder & "\" & Me.cmbTime.Text

       Me.pcbCam1.Image = Image.FromFile(fileName)

    End Sub

Bob
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Kit_Kat111Author Commented:
I appreciate your input!

it seems that path is wrong, I got debug output when I used the combo box:

Cam0\Cam1-20060224165648-01.jpg
0
Kit_Kat111Author Commented:
so I need Cam0 to skip over and start with Cam 1 (with a space)....not my files to rename. :(
0
Kit_Kat111Author Commented:
see you got me started....thank you...part of it is working...

        Dim dt As DateTime = DateTime.ParseExact(cmbDate.Items(cmbDate.SelectedIndex), "MMMM d, yyyy", Nothing)
        Dim folder As String = "C:\Projects\Darryl\Queue Review Files\" & dt.Month & "-" & dt.Day & "\Cam " & Me.cmbDate.SelectedIndex + 1

        Dim fileName As String = folder & "\" & Me.cmbTime.Text

        Me.pcbCam1.Image = Image.FromFile(fileName)

First picture is displayed....but I need the other pcbCam# files to be showing too....I am so happy thank you!! This is so much better than a few hours ago!
0
Bob LearnedCommented:
Does that mean that you need all 6 displayed at the same time?

Bob
0
Kit_Kat111Author Commented:
I got it working using some case statements ...thank you Bob for your help
0
Kit_Kat111Author Commented:
Yes....I need all working at the same time....I do have a problem with it though....but I will award points first
0
Bob LearnedCommented:
I am still confused about how the images are stored for pcbCam1, pcbCam2, ....  

Are they stored by date?  Are there 6 images for each date in a folder?

Bob
0
Kit_Kat111Author Commented:
still trying to fix this....

http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21784980.html


Each jpg is a time stamp, there are six folders which are different camera views. So there will be six pictures (psbCam1) with the same time but at different angles.

Look at my second part of this question from the link above....thank you Bob!
0
Kit_Kat111Author Commented:
can you delete this question?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.