LCKB
[C#]Changing opening files in C# - Printable Version

+- LCKB (https://lckb.dev/forum)
+-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109)
+--- Forum: Programmers Gateway (https://lckb.dev/forum/forumdisplay.php?fid=196)
+---- Forum: Coders Talk (https://lckb.dev/forum/forumdisplay.php?fid=192)
+---- Thread: [C#]Changing opening files in C# (/showthread.php?tid=665)



- Kenpachi - 02-12-2012


I have gotten this far but now a little lost.

 

string Chosen_File = "";

openFD.InitialDirectory = "C:";

openFD.Title = "Open a Text File";

openFD.FileName = "";

 

How do I change the .txt opening file to a .bin or other file?




- Phyyl - 02-12-2012

openFD.Filter = "Bin Files|*.bin"




- someone - 02-12-2012


First thing Put on your title the language Tag [C++] or [C#] because it will be confusing..

 

On your question:

Set a filter to openfiledialog, the filter will receive a string like this "First Name | extention | second name | extention | etc..

Example:

openFD.Filter = "LOD files | *.lod | DTA fles | *.dta"




- Kenpachi - 02-12-2012

Okay thanks and sorry about that, next time Ill make sure to add it Smile