|
-
Jan 12th, 2008, 03:28 AM
#1
Thread Starter
Frenzied Member
[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
-
Jan 12th, 2008, 03:45 AM
#2
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.
-
Jan 12th, 2008, 03:57 AM
#3
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
-
Jan 12th, 2008, 04:11 AM
#4
Thread Starter
Frenzied Member
Re: common dialog
I have filter to *.tin.. How to execute A.dat when I click the filename with extension A.tin?
-
Jan 12th, 2008, 04:38 AM
#5
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|