The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

import-bot (20211) [Avatar] Offline
#1
[Originally posted by dotmas]

Hi, Is it possible with C# to use OLE technology, like inplace-activation? If
yes, in which book/url can I find some good sample code?

Thanks in advance. Best Regards.
Massimo T.
import-bot (20211) [Avatar] Offline
#2
Re: C# and OLE technology
[Originally posted by fgrimes]

Hi Massimo,

You can interoperate with COM, but frankly I don't know much about OLE
in-place activation. (Anyone?) If I were to start digging, I'd begin with
the System.Runtime.InteropServices namespace. It contains a bunch of classes
for accessing COM objects and native APIs.

Regards,
Fergal
import-bot (20211) [Avatar] Offline
#3
Re: C# and OLE technology
[Originally posted by dotmas]

Hi Fergal, thank you for your answer.

Ole In-place activation is the capability for an application to include/embed
another application, show it and edit it directly from the application it
self.

For example: wordpad is able to include an object (for example an excel
spreadsheet) and edit it from the wordpad interface, without launch excel.
This is possible thanks to OLE technology.

I was able to produce application with this capabilities using C++ 6.0 and
MFC, and I still able to do that using C++ MFC .NET.

But I want leave MFC, and I can't do that if I don't find an alternative
solution. I hoped use C#, but I am not sure that it is so flexible.

I hope my explanation will be useful for you....any Idea abut C# and OLE
technology?

Thanks.
andrym (1) [Avatar] Offline
#4
Re: C# and OLE technology
Hi, Massimo.
I have sample problem. Some days I spent for find way to implement In-place into C#. I founded some articles, where people wrote that it no way fo do it smilie
I'll try to create COM wrapper object which gets a CLSID of another COM object, creates and puts it on its form area. I think that I can put the object like static to any .NET form and implementation of OLE In-place activation is into COM environment (between static COM object and embeded COM object).
I don't have enought time for check it, but I don't shure that this way will succeeded.

So, what do you think about my idea?


Message was edited by: andrym
olaf871 (1) [Avatar] Offline
#5
Re: C# and OLE technology
Hi
if it goes with VBA, it should go with C# too.
Can you tell how to embed an excel-Spreadshhet in a VB or C++ window?
regards
Olaf