473,387 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

get text from clipboard as html formate

Hi everyone...

I want to copy text from clipboard and paste into my project.I am able to do it but problem is Its not in same formate..That means I want bold letter as bold and with same font .....means If I copy it from website then its html formate remain same...
Apr 15 '08 #1
2 1419
balame2004
142 100+
Hi everyone...

I want to copy text from clipboard and paste into my project.I am able to do it but problem is Its not in same formate..That means I want bold letter as bold and with same font .....means If I copy it from website then its html formate remain same...

Can you show your code here?
Apr 15 '08 #2
Can you show your code here?
Expand|Select|Wrap|Line Numbers
  1.  
  2. IDataObject idata = Clipboard.GetDataObject();
  3.  
  4.  
  5. if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Html))
  6. {
  7.        rtextbox.Text = rtextbox.Text + (string)idata.GetData(DataFormats.Html);
  8. }
  9. else if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
  10. {
  11.        rtextbox.Text = rtextbox.Text + Clipboard.GetText();
  12. }
  13.  
  14.  
thanks for reply...This is part of my code,,,where rtextbox is rich textbox
Apr 15 '08 #3

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

Similar topics

2
by: Trader | last post by:
Hi, I'm trying to use Mark Hammond's win32clipboard module to extract more complex data than just plain ASCII text from the Windows clipboard. For instance, when you select all the content on...
7
by: Wayne Wengert | last post by:
I have an ASP page in which I want to copy the contents of a variable (text) to the clipboard. Based on MSDN examples I tried window.clipboardData.setData(strTemp) and that generates an error...
4
by: Risto Heinonen | last post by:
Hi. I have a web page that has images and text. I can carefully select one image and the on the right of the image and then copy & paste to Word. Is it possible to make javascript do the same:...
7
by: William Gill | last post by:
Is there a simple way to cut and paste from a tkinter text widget to an entry widget? I know I could create a mouse button event that triggers a popup (message widget) prompting for cut/paste in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.