| | |
How to keep text file from user
Please support our C# advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Jul 2009
Posts: 5
Reputation:
Solved Threads: 0
Thanx serkan, its a simple nice solution I embedded txt file as well which should have worked but .NET framwork exception says program cant find txt file on path ...\... \desktop\data.txt (path where application.exe was clicked to run). Can you suggest how can we make application.exe find txt file on path expected by program (to read it) which should be a simple & preferred solution OR any other solution than one you suggested. Thanks again.
Use Application.ExecutablePath property.
C# Syntax (Toggle Plain Text)
String path=System.IO.Path.GetDirectoryName (Application.ExecutablePath) + "\\data.txt";
Failure is not fatal, but failure to change might be. - John Wooden
•
•
Join Date: Jan 2008
Posts: 2,052
Reputation:
Solved Threads: 118
to get the application path refer to this thread
http://www.daniweb.com/forums/thread196784.html
http://www.daniweb.com/forums/thread196784.html
Due to lack of freedom of speech, i no longer post on this website.
•
•
Join Date: Jul 2009
Posts: 5
Reputation:
Solved Threads: 0
Thanx to all! I have tried both solutions but as mentioned, being a beginner, I couldnt make it work, implement within project. Anyone please can provide with a small demo working example of either "embedding the txt file & modifying application path in prg. code" or "implement encrypt-decrypt to make txt file human unreadable( application readable) within the project" in order to make txt file either hidden or unreadable by end user etc. After your reply this thread needs to be closed, whether solved or unsolved (before dan's admin delete it) Thanx again.
![]() |
Similar Threads
- Validating user input against text file (Python)
- Reading text file ... (C)
- changing the expected row of text file (C++)
- replace data of a text file with user input (C++)
- Trying to get a program to extract data from a text file (C++)
- Help, Add and Delete many useres from text file (Shell Scripting)
- read-delete lines from a text file (PHP)
- Searching a text file (Python)
- turning userinput into a text file (C)
Other Threads in the C# Forum
- Previous Thread: href help
- Next Thread: Open new web page with C# code behind page
| Thread Tools | Search this Thread |
.net access algorithm array barchart bitmap box broadcast c# check checkbox client combobox control conversion csharp custom customactiondata database datagrid datagridview dataset date/time datetime datetimepicker degrees development dll draganddrop drawing encryption enum event excel file filename files form format forms function gdi+ gis gtk hash httpwebrequest image index input install java label list listbox mandelbrot math mouseclick mysql operator outlook2003 path photoshop picturebox pixelinversion pixelminversion post programming radians regex remote remoting richtextbox server sleep socket sql statistics stream string table tables tcp text textbox thread time timer tutorial update usercontrol usercontrols validation visualstudio webbrowser webcam wia windows winforms wpf xml






