473,748 Members | 2,617 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to copy the file in richtextbox .

1 New Member
I am having multiple format files(.jpeg,.tx t,.doc,.excel) in a folder.I want to show those file with their icon in richtextbox in c#.
Expand|Select|Wrap|Line Numbers
  1. i am having file at clipboard.
  2.  string[] files = Directory.GetFiles(pp);
  3.                         DataObject objData = new DataObject();
  4.                         foreach (string file in files)
  5.                         {
  6.  
  7.                             objData.SetData(DataFormats.FileDrop, true, file);
  8.                             Clipboard.SetDataObject(objData, true);
  9.                             lst.Items.Add(file);
  10.                             rht_attachment.Focus();
  11.                             rht_attachment.Paste();
  12.                             rht_attachment.Update();
  13.                         }
  14.                         rht_attachment.Refresh();
Sep 17 '13 #1
1 1682
Aurangzeb
11 New Member
Did you try the SaveFile method located on the RichTextBox itself? http://msdn.microsoft.com/en-us/libr...le(VS.71).aspx
Sep 18 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1531
by: Grey | last post by:
I have a ASP.NET web application which is required to copy file from windows server to Novell Netware server. I have used impersonation to connect to Netware server. The application works fine when the web server installed Novell Client for Windows, but it has error when changed to another web server which is installed Client Services for Netware (windows built-in Novell connector). The error is "System.IO.IOException: The network path...
9
15535
by: MAF | last post by:
Does anyone know why in 2005 I might be getting this error everytime I try and recompile? Error 226 Unable to copy file "obj\Debug\myfile.dll" to "bin\Debug\myfile.dll". The process cannot access the file 'bin\Debug\myfile.dll' because it is being used by another process. myfile
3
2382
by: MAF | last post by:
Does anyone know why in 2005 I might be getting this error everytime I try and recompile? Error 226 Unable to copy file "obj\Debug\myfile.dll" to "bin\Debug\myfile.dll". The process cannot access the file 'bin\Debug\myfile.dll' because it is being used by another process. myfile
5
4225
by: Standist | last post by:
I want install software on PC in my local network. First I want copy file to the PC through default share like c$ or d$ on the PC. Then install the software through wmi. I have the administrator and password of every PC. How can I do this.
1
1663
by: vandanaj | last post by:
hi everyone i want to know how to copy file in asp thanx in advance
0
1395
by: Pivalig | last post by:
Hello, i try to copy file from Pocket PC to network printer using this code : destination = "\\\\pc1\\ep1000\\Bill.txt"; File.Copy("\\Program Files\\MobileKhelner\\Bill.txt", destination); It works well, but borrows a lot of time (48 sec) at the first attempt Next attempt after 5 sec working momentaly. I think, that business in WindowsMobile 5 Help m please!
9
4998
rizwan6feb
by: rizwan6feb | last post by:
Hello everybody. I need help on how to use copy function to copy file from one computer to another ( or any other way i can copy the file). The computers are on a local network.
1
1615
by: Irrigho5 | last post by:
i have the open file function just need help with the copy file function and main Ask for a source filename and a target filename. Then copy the source file to the target file using the open_file() function of problems 3 and 4, a new copy_file(source_file, target_file) function, and a main() function, with the same exception handling as problems 3 and 4. copyfile1.py – The copy_file() function must not use a loop. please im me on AIM...
2
4730
by: foss | last post by:
hi all, I am not able to copy file from a directory in the server to another directory. Here, the source is outside the web root directory and the destination is inside the web root directory. I got a warning The code is as follows:
1
4718
by: rajibdotnet | last post by:
Till Date, I find no solution to the problem below. Unable to copy file "obj\Debug\Tax2010.dll" to "bin\Tax2010.dll". The process cannot access the file 'bin\Tax2010.dll' because it is being used by another process. In my case, I have two projects under one Solution named "Tax2010" 1) Calc and Calc.DLL (contains .cs class files) 2) Tax2010 and Tax2010.DLL (contain .aspx pages along with respective .cs files and other .cs class...
0
8996
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
9333
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8255
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6799
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3319
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.