Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
0
Answer
problem in appending (.wri)wordpad file
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
try abc
16y
2.7k
1
Reply
hello everyone..
In my c# project I want to paste rtf text to wordpad from clipboard.I am using streamwriter for that.
I have three richtextbox and I am able to paste only first textbox data not others.
here is my code please help me...
Code: ( text )
StreamWriter sw = new StreamWriter("wpreview.wri");
for (int i = 0; i < count; i++)
{
child = clpbrd_panel.Controls["chkbox" + i];
if (child != null)
{
if (((CheckBox)child).Checked == true)
{
child = clpbrd_panel.Controls["rtextbox" + i];
((RichTextBox)child).SelectAll();
((RichTextBox)child).Copy();
idata = Clipboard.GetDataObject();
if (idata.GetDataPresent(DataFormats.Rtf))
{
sw.Write(idata.GetData(DataFormats.Rtf));
sw.WriteLine("");
}
}
}
sw.close();
Post
Reset
Cancel
Answers (
0
)
Next Recommended Forum
Video Editing In C# How?
check and get the name of device connect to PC using by c#