+1  A: 

A readme file normally has an extension. I suppose you did, but did you check this folder option to see the extensions of known file types? Has it changed anything?

EDIT #1

Frankly, I doubt you'd be able to make the OpenFileDialog display files with no extension, as the Filter property is based on the extension.

Perhaps you could inherit base your own implemented OpenFileDialog using the System.IO namespace objects such as DirectoryInfo, for instance, which will allow you to get the browsed folder files with the Getfiles() method, then filter yourself through LINQ to display the files with no extension only with the FileInfo.Extension property.

EDIT #2

Since the OpenFileDialog is sealed, you may use it as a nested type and implement your own methods using this nested type.

I hope this helps you!

Will Marcouiller
I am just using readme as an example. I am going to change it in my post because it is not a good example.
fraXis
A: 

I thought using *. would work, but it doesn't, so it seems that's a limitation of the OpenFileDialog control.

You could create your own dialog but the OpenFileDialog is not inheritable so this would end up being a lot of work for just a small feature.

Is the file with no extension created by your own application? If that's the case, you could give it a custom extension for your filtering. If it's not, then I'm afraid I can't think of anything else to help you :(

Good luck!

vitorbal
No. Another software program is creating the files that have no extensions. My client just wants to be able to see the files that have no extensions so he can easily open them in a directory with other files that have extensions.
fraXis
Even though the OpenFileDialog is sealed (not inheritable), you may use it as a nested type. For instance, using a property that will get the NativeDialog. Then, you write your method always using the NativeDialog property and you're done.
Will Marcouiller
A: 

If the other software program creates these files in the same location, why not have your code add an extension (something innocuous like ".XXX") to every extension-less file in that folder, and then show the dialog?

Edit: Or, see this MSDN article:

http://msdn.microsoft.com/en-us/library/ms646960(VS.85).aspx

From the Filters section:

The CDN_INCLUDEITEM notification message provides another way to filter the names that the dialog box displays. To use this message, provide an OFNHookProc hook procedure and specify the OFN_ENABLEINCLUDENOTIFY flag in the OPENFILENAME structure when you create the dialog box. Each time the user opens a folder, the dialog box sends a CDN_INCLUDEITEM notification to your hook procedure for each item in the newly opened folder. The return value of the hook procedure indicates whether the dialog box should display the item in the folder's item list.

Down at the bottom in the Explorer-Style Hook Procedures section, the article explains how to do this. Basically, you pass an event handler to the OpenFile dialog, and each time the user navigates to a new folder, the dialog iterates through all the files in the folder and calls your event handler for each one. Inside the event handler, you would put your code to determine if the file has an extension or not, and return true or false, accordingly.

MusiGenesis
Great idea! Thanks!
fraXis
Try the second idea and let me know if it works.
MusiGenesis