15,886,110 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by LosEagle (Top 30 by date)
LosEagle
28-Feb-13 11:11am
View
This looks like it can work but how can I please use this? I'm totally new in scripting so sorry for stupid questions.
LosEagle
28-Feb-13 2:41am
View
Yes you perfectly understand what I need to do :). But I need to make webBrowser from Visual Studio to do this and the problem is that VS uses IE :(. But thanks for help anyway! Will note this answer as it seems useful.
LosEagle
20-Aug-12 20:22pm
View
Thanks so much!! I've just had file named "text.txt" instead of just "text" and renamed and now it works!!
LosEagle
20-Aug-12 19:56pm
View
Thanks it all makes sense for me. However it loads nothing for some reason :(. Still thanks for answer. Didn't programmed for long time so I will just make sure everything is fine.
LosEagle
20-Aug-12 19:50pm
View
Sorry for that. Updated the whole thing.
LosEagle
29-Apr-12 16:42pm
View
Thank you guys
LosEagle
29-Apr-12 16:41pm
View
Thank you both for your answers. Looks like both should work as I need :)
LosEagle
26-Apr-12 15:15pm
View
Alright thank you very much :)
LosEagle
26-Apr-12 9:54am
View
For example some sport sites provide text stream instead of video stream. There is commentator which writes what happens in the match to the site so you know it without watching video and my question was if its possible to send this via sms :). Sorry for my bad english don't know how to properly descripe this text streaming sites
LosEagle
19-Apr-12 18:20pm
View
Well it seems I found sollution. Thank you :)
LosEagle
22-Mar-12 18:36pm
View
Thanks, very useful codes are there :). But I still have the problem with saving font of text. What I'm trying to do is application which can save the text with changed font and when I load it again the font will appear as I changed it in application. I used the advices from great answers here and I can change the selected font in application but when I save it in txt for example and load it again using readalltext and the font in richtextbox is the last font I used in changing selected text :-/ Well, at least I can temporary change the font of selected text without saving
LosEagle
22-Mar-12 12:05pm
View
Ok, thanks to your and Dalek's answer I figured out how to change font of selected text. But when I want to save the file I don't know much how to do because it seems like ReadAll (when I want to see saved file) and WriteAll are just reading and saving the file in default font. Should I create FileStreams?
LosEagle
21-Mar-12 18:10pm
View
Yes sorry that I wrote the important part of my question to end. Your answer was helpful but it saves in default font.
LosEagle
28-Feb-12 9:46am
View
Deleted
This is the sample of how I read from the text file in loading of form.
StreamReader sr = new StreamReader(fs); // STREAMREADER
string name = sr.ReadLine();
string age = sr.ReadLine();
string birthdate = sr.ReadLine();
string decname = decode(name);
string decage = decode(age);
string decbirthdate = decode(birthdate);
int numage = int.Parse(decage);
This is how I write new line to file (sorry forgot to mention that forth line I'm appending in this form is from listbox)
string item = tymlist.SelectedItem.ToString();
string encitem = encode(item);
using (FileStream fs = new FileStream(@"data/file01.bin", FileMode.Append, FileAccess.Write))
{
StreamWriter sw = new StreamWriter(fs); //STREAMWRITER
sw.WriteLine("{0}", encitem);
sw.Dispose();
}
Maybe it looks strange that I have in loading three lines. Its because I'am writing those three informations to file in form #1 and in second I'am adding new line. But If I want to decode those four lines I get Base-64 error.
LosEagle
28-Feb-12 2:20am
View
Deleted
Sure, I will give here code. Just when I get home to my source code :)
LosEagle
28-Feb-12 2:16am
View
Doesn't work means that when I'am using decoder to decode encoded text in the text file I get back Base-64 char array error. When I used some browser based encoders/decoders and gived there content of text file it just didn't taked before I deleted the lines to have only 2 lines. So I think this is the reason why it doesn't work. (Sorry for late answer when I was writing this topic it was midnight in Czech)
LosEagle
26-Feb-12 13:16pm
View
Sorry didn't know that this problem will have similar solution like last one because I didn't even though that I will need to use both StreamReader and StreamWriter just to add lines. Thanks for help I will give it try.
LosEagle
21-Feb-12 15:10pm
View
I have TextBox multiline property set to true and I've already readed file to textbox and changed the text. I've made button which will read the textbox and save it to string after the click. But I just don't know how to write that string into a file :(. Didn't found any command for that. Just Writeline() and it will writes all the things in the string to one line I think. But still thanks for all the things you wrote.
LosEagle
19-Feb-12 19:53pm
View
That sounds finaly like solution for my problem :) please can you give me a piece of code where you use this? I've tried to make it but I just don't know how and where to do this.
LosEagle
16-Feb-12 6:54am
View
Thats similar to what I have right now but when I use hiding it looks bad when I'am "moving across program" because icon disapears and new shows etc... . But thanks for your help I appreciate that
LosEagle
16-Feb-12 6:51am
View
Thanks I will give a look :)
My code:
this.Hide();
Form2 secondtform = new Form2();
secondform.Show();
but it doesn't look good because when moving from one form to second etc.. icon disapears new shows .. it just doesn't look normal
LosEagle
16-Feb-12 6:45am
View
The reason of flickering is because I use this
this.Hide();
Form2 secondtform = new Form2();
secondform.Show();
So it hides first form and shows second.
I'am going to try your solution :)
LosEagle
15-Feb-12 19:19pm
View
Don't know how to do it :D. Will it work if I use it for more than just two forms? Sorry for noob question just learning it for few weeks :)
LosEagle
15-Feb-12 19:09pm
View
I tagged it as C# do I have to add another tag? I'm working on Windows Form application :)
LosEagle
15-Feb-12 9:22am
View
Ok thanks :) I think I know what you mean
LosEagle
14-Feb-12 15:24pm
View
Thanks :) so it should look like string str = streamReader.ReadLine(); but I can't find how to specify what line to read when I type something into brackets it shows error :-/
LosEagle
13-Feb-12 17:07pm
View
The UTF8 encrypted strings like xaF1bGM= are enough for me at this time :). I don't need hundres of codes just for encryption and decryption.
LosEagle
13-Feb-12 16:05pm
View
Thanks. Thats pretty good tutorial really helped me :). But when I do it exactly like that I get an error “Invalid length for a Base-64 char array”.
LosEagle
13-Feb-12 16:03pm
View
Just encode text to file so when someone open it, he will see this coded and when I need to use it in my program decode it to variable and show decoded text.
LosEagle
13-Feb-12 15:49pm
View
ok so I changed the System.Text.ASCIIEncoding.ASCII. for System.Text.Encoding.UTF8. In encoder and decoder
but now it shows error “Invalid length for a Base-64 char array” in converting FromBase64String in decoder when I type something in textbox.
Show More