Results 1 to 5 of 5

Thread: [RESOLVED] common dialog

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    1,370

    Resolved [RESOLVED] common dialog

    I have problem here. I used common dialog, how I open A.tin and A.dat in one time?

    Code:
    dlgOpen.Filter = "(*.tin)|*.tin|"
    dlgOpen.ShowOpen
    InputFileTIN = dlgOpen.FileName
    dlgOpen.Filter = "DAT File (*.dat)|*.dat|All File |*.*"
    dlgOpen.ShowOpen
    InputFilePoint = dlgOpen.FileName 
    txtPoint = dlgOpen.FileName

  2. #2
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Re: common dialog

    You mean how to filter ? Example :
    Code:
    cd.filter = "Bitmap Files (*.bmp)|*.bmp|JPG Files (*.jpg)|*.jpg|Icon File (*.ico)|*.ico"
    cd.ShowOpen
    Picture1 = LoadPicture(cd.FileName)
    Last edited by Fazi; Jan 12th, 2008 at 03:51 AM.

  3. #3
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Re: common dialog

    or like this ?

    Code:
    Private Sub Form_Load()
    Dim i As Long
    
    dlgOpen.Filter = "Tin Files (*.tin)|*.tin|DAT File (*.dat)|*.dat|All File |*.*"
    dlgOpen.ShowOpen
    
    If Right(dlgOpen.FileName, 4) = ".tin" Then
       InputFileTIN = dlgOpen.FileName
    Else
       InputFilePoint = dlgOpen.FileName
       txtPoint = dlgOpen.FileName
    End If
    
    End Sub

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    1,370

    Re: common dialog

    I have filter to *.tin.. How to execute A.dat when I click the filename with extension A.tin?

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: common dialog

    What do you mean by "execute"? Only an Exe can be executed.

    Do you mean "Open"?

    I am familiar with the .dat extention, but have no idea what a .tin file is.

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