Results 1 to 3 of 3

Thread: Dialog Boxes

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 1999
    Posts
    25

    Question

    I have been trying to figure this out, but have failed. I want to make an event so when the user clicks a command button, an OPEN DIALOG BOX OPENS. I have figured how to do that. But what i want to know is how do I filter the types of files that appear in the Open Dialog Box? Lets say I want the types of files to appear are .mp3, .rm, .au, and .wav. I understand how to filter one type, but what if i wanted all those other file types too?

    This is my code currently:
    (The cdbOpen is the common dialog box control)

    -------------START OF CODE---------------
    Dim strFilePath As String

    cdbOpen.DialogTitle = "Open File"
    cdbOpen.Filter = "*.mp3"
    cdbOpen.FileName = "*.mp3"
    cdbOpen.ShowOpen

    strFilePath = cdbOpen.FileName
    -------------END OF CODE------------------


    Please Help!! Please also modify this code and tell me, or if this code isn't right, then write another other please. I will appreciate it, thanks in advance.

  2. #2
    Guest
    Seperate them with a semi colon (;)

    Code:
    cdbOpen.Filter = "*.mp3;*.rm;*.au;*.wav"

  3. #3

    More Detailed...

    Heres A More Detailed Way:
    <----------------Code----------------->
    cdbOpen.DialogTitle = "Open File"
    cdbOpen.Filter = "All Sound Files|*.mp3;*.au;*.wav;*.ra|"
    cdbOpen.FileName = "MP3(*.mp3)|*.mp3"
    cdbOpen.ShowOpen
    I Think I Might Dont Know The Answer To That One...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width