I just took a look at wordpad. There is a ribbon button called "insert Paint drawing". When I click that button, mspaint opens up and prompts me to draw something. After drawing something, I can click the "Update document" button. There is no save option (only "Save copy as"). Also, there is no exit button. Instead it show an "Exit and return to document" button.
Now my questions are: If and how can I benefit from this functionality in my C# desktop application? I thought about some IPC, but I couldn't figure out how it could work. Anyone got an idea?
This is called OLE (object linking and embedding). You're embedding a Microsoft Paint document into a Wordpad document. This technology has been around since Windows 95.
The .NET Framework has no support for OLE whatsoever. If you really wanted to do this, you would be better off writing a C++ app and taking advantage of either the MFC or ATL libraries, which have explicit support for this. More information about targeting .NET is available in the answers to this question.
Visit the following link, don't forget to download the sample project.
http://www.c-sharpcorner.com/UploadFile/mahesh/ActiveDocumentHostControl11102005040550AM/ActiveDocumentHostControl.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With