CommonDialog and File Extension


Is it normal that when I want to save a file with a four
letter extension like HTML that it writes it as HTM?

How do you make it write the proper extension?
vip110598Asked:
Who is Participating?
 
idcanadaConnect With a Mentor Commented:

Have a string keep the Dailogs Filename,
select case filterindex and manualy add the last letter of the ext.

0
 
JimKirbyCommented:
I don't think I have a real answer for you, but it has always been my understanding that an IBM PC (such as old DOS, Windows 95/98, etc.) will allow only a three-letter extension, whereas a MacIntosh or a computer using the UNIX operating system will allow the four-letter extension you want.  I guess it's due to feeding habits of the different beasts . . .

JK
0
 
mark2150Commented:
There's a flag in the common Dialog control that will allow long file names. You have to set it for it to save in other than DOS 8.3 format.

M

0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
mark2150Commented:
cdlOFNLongNames      &H200000       Use long filenames.
0
 
idcanadaCommented:

That's funny,
I use this flag and yet it still does not let me save an
extension with more than 3 characters.

Mark2150,
is their any other way or could something be setting back
my flag to its default?


0
 
vip110598Author Commented:

As idcanada mentioned,
when i use this flag, it still does not let me save a *.html.


0
 
mark2150Commented:
Dunno. It works ok here...

Do you have the MultiSelect flag on?

Check you windows settings.

M
0
All Courses

From novice to tech pro — start learning today.