Click here to Skip to main content
15,905,420 members
Home / Discussions / C#
   

C#

 
QuestionHandling Usercontrol with menu items in C# Pin
Hammad Rasheed25-Oct-11 23:36
Hammad Rasheed25-Oct-11 23:36 
AnswerRe: Handling Usercontrol with menu items in C# Pin
V.26-Oct-11 1:16
professionalV.26-Oct-11 1:16 
AnswerRe: Handling Usercontrol with menu items in C# Pin
PIEBALDconsult26-Oct-11 2:33
mvePIEBALDconsult26-Oct-11 2:33 
QuestionRe: Handling Usercontrol with menu items in C# Pin
Luc Pattyn26-Oct-11 4:16
sitebuilderLuc Pattyn26-Oct-11 4:16 
AnswerRe: Handling Usercontrol with menu items in C# Pin
PIEBALDconsult26-Oct-11 14:50
mvePIEBALDconsult26-Oct-11 14:50 
AnswerFlag: Repost of QA question: Re: Handling Usercontrol with menu items in C# Pin
BillWoodruff27-Oct-11 21:05
professionalBillWoodruff27-Oct-11 21:05 
QuestionInsert image on ricktextbox Pin
Chu Van Dat25-Oct-11 15:56
Chu Van Dat25-Oct-11 15:56 
AnswerRe: Insert image on ricktextbox Pin
Luc Pattyn25-Oct-11 16:24
sitebuilderLuc Pattyn25-Oct-11 16:24 
I needed that functionality not so long ago, and was able to get it up and running, with a lot of help from Google.

It is quite complex, and beyond the scope of a forum message. Here is the gist of it:
- a RichTextBox basically displays whatever is in an RTF document (which can be created using an app such as WordPad, or MS Word; or can be constructed programmatically by obeying the RTF specification).
- AFAIK the only way to have an image in an RTF, is by embedding all the image data using a MetaFile; there are two metafile formats, WMF and EMF, one is easier to construct, the other is what is needed eventually.
- there isn't an all-managed solution; you would need to call some native Windows functions (GdipEmfToWmfBits, DeleteEnhMetaFile), which requires P/Invoke.

The dataflow is like so:
Image -> Graphics -> Metafile(EMF) -> Metafile(WMF) -> RTFdocument

If you feel up to it, you now have a number of essential keywords. Good luck.

Smile | :)
Luc Pattyn [My Articles] Nil Volentibus Arduum

GeneralRe: Insert image on ricktextbox Pin
Mycroft Holmes25-Oct-11 21:44
professionalMycroft Holmes25-Oct-11 21:44 
GeneralRe: Insert image on ricktextbox Pin
BobJanova25-Oct-11 22:54
BobJanova25-Oct-11 22:54 
AnswerRe: Insert image on ricktextbox Pin
Luc Pattyn26-Oct-11 0:36
sitebuilderLuc Pattyn26-Oct-11 0:36 
GeneralRe: Insert image on ricktextbox Pin
BobJanova26-Oct-11 2:47
BobJanova26-Oct-11 2:47 
AnswerRe: Insert image on ricktextbox Pin
Luc Pattyn26-Oct-11 4:12
sitebuilderLuc Pattyn26-Oct-11 4:12 
GeneralRe: Insert image on ricktextbox Pin
BobJanova26-Oct-11 5:09
BobJanova26-Oct-11 5:09 
AnswerRe: Insert image on ricktextbox Pin
Luc Pattyn26-Oct-11 5:21
sitebuilderLuc Pattyn26-Oct-11 5:21 
QuestionCreate LDAP Listener Pin
tellaston134525-Oct-11 8:01
tellaston134525-Oct-11 8:01 
QuestionSorting in multiple columns in gridview using C# Pin
Dhyanga25-Oct-11 7:01
Dhyanga25-Oct-11 7:01 
AnswerRe: Sorting in multiple columns in gridview using C# Pin
Not Active25-Oct-11 8:36
mentorNot Active25-Oct-11 8:36 
GeneralRe: Sorting in multiple columns in gridview using C# Pin
Dhyanga25-Oct-11 9:32
Dhyanga25-Oct-11 9:32 
GeneralRe: Sorting in multiple columns in gridview using C# Pin
Not Active25-Oct-11 9:38
mentorNot Active25-Oct-11 9:38 
AnswerRe: Sorting in multiple columns in gridview using C# Pin
Luc Pattyn25-Oct-11 9:50
sitebuilderLuc Pattyn25-Oct-11 9:50 
GeneralRe: Sorting in multiple columns in gridview using C# Pin
Dhyanga25-Oct-11 9:53
Dhyanga25-Oct-11 9:53 
AnswerRe: Sorting in multiple columns in gridview using C# Pin
Luc Pattyn25-Oct-11 10:18
sitebuilderLuc Pattyn25-Oct-11 10:18 
QuestionDeployment of c# application with merge modules Pin
sarang_k24-Oct-11 20:49
sarang_k24-Oct-11 20:49 
AnswerRe: Deployment of c# application with merge modules Pin
Pete O'Hanlon24-Oct-11 21:05
mvePete O'Hanlon24-Oct-11 21:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.