-
[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
-
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)
-
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
-
Re: common dialog
I have filter to *.tin.. How to execute A.dat when I click the filename with extension A.tin?
-
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.