|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Microsoft: Help with OLE documents...I have an application to draw and design different documents, that supports linking and embedding of other documents (like, for instance, Corel Draw or Word). Then, the user can print their designs "WYSIWYG", so I load the external document inside an OLE document container control (VB6), get a handle to the object and invoke OleDraw with the hDC that I want the object in. This have been working excellent, and this application is largely distributed among our clients. The problem is we want to migrate to .NET (any language, VB, C#, C++, ...), but there's no OLE container that lets me obtain a handle to an OLE document. I know you could import COM and ActiveX, but this particular control (included in VB6) CANNOT BE IMPORTED NOR INSERTED in .Net. Microsoft calls this a "migration issue" and warns us about it, but how, then, can I draw an Ole document inside our application (let alone open, edit, update, etc)? Is Microsoft planning to update this component for VS.Net 2005? Or is there an alternative? I know I could load an OLE document "the hard way", but those are methods so obscure, I get lost before even starting to insert the document in a container... If this is the only solution, is there an easy (as easy as this can be) example that can lead me to accomplish the insertion of a document inside mine? I know it can be done, because RTF editor lets you do it. It even lets you open and edit the document, and "paste special", but I don't seem to accomplish getting a handle to any of those inserted objects... Thank you for your time, VBen. On Tue, 15 Feb 2005 11:35:30 -0600, "VBen" <bmora***@compucaremexico.com> wrote: ¤ Hi all.¤ I have an application to draw and design different documents, that supports ¤ linking and embedding of other documents (like, for instance, Corel Draw or ¤ Word). Then, the user can print their designs "WYSIWYG", so I load the ¤ external document inside an OLE document container control (VB6), get a ¤ handle to the object and invoke OleDraw with the hDC that I want the object ¤ in. ¤ This have been working excellent, and this application is largely ¤ distributed among our clients. ¤ The problem is we want to migrate to .NET (any language, VB, C#, C++, ...), ¤ but there's no OLE container that lets me obtain a handle to an OLE ¤ document. ¤ I know you could import COM and ActiveX, but this particular control ¤ (included in VB6) CANNOT BE IMPORTED NOR INSERTED in .Net. ¤ Microsoft calls this a "migration issue" and warns us about it, but how, ¤ then, can I draw an Ole document inside our application (let alone open, ¤ edit, update, etc)? ¤ Is Microsoft planning to update this component for VS.Net 2005? Or is there ¤ an alternative? ¤ I know I could load an OLE document "the hard way", but those are methods so ¤ obscure, I get lost before even starting to insert the document in a ¤ container... If this is the only solution, is there an easy (as easy as this ¤ can be) example that can lead me to accomplish the insertion of a document ¤ inside mine? ¤ I know it can be done, because RTF editor lets you do it. It even lets you ¤ open and edit the document, and "paste special", but I don't seem to ¤ accomplish getting a handle to any of those inserted objects... ¤ Thank you for your time, ¤ VBen. ¤ I'm not sure whether this will help you but it's the closest support there is for an OLE container control in .NET: Visual C++ ActiveX Control for hosting Office documents in Visual Basic or HTML http://support.microsoft.com/default.aspx?scid=kb;en-us;311765 You can also use the Web Browser control but I don't believe that would give you the functionality you need. I'm not aware of any consideration for support of an OLE container control in Visual Basic 2005. Paul ~~~ pclem***@ameritech.net Microsoft MVP (Visual Basic) Thank you!
I'll try it today... Apparently you can open documents by ProgID, so it should be able to open other types of documents... I'll let you know if this solved my problem. VBen. Show quoteHide quote "Paul Clement" <UseAdddressAtEndofMess***@swspectrum.com> escribió en el is for an OLE containermensaje news:2gm4111lmug1akq1kl77sl45bcm96c42mm@4ax.com... > On Tue, 15 Feb 2005 11:35:30 -0600, "VBen" <bmora***@compucaremexico.com> wrote: > > ¤ Hi all. > ¤ I have an application to draw and design different documents, that supports > ¤ linking and embedding of other documents (like, for instance, Corel Draw or > ¤ Word). Then, the user can print their designs "WYSIWYG", so I load the > ¤ external document inside an OLE document container control (VB6), get a > ¤ handle to the object and invoke OleDraw with the hDC that I want the object > ¤ in. > ¤ This have been working excellent, and this application is largely > ¤ distributed among our clients. > ¤ The problem is we want to migrate to .NET (any language, VB, C#, C++, ....), > ¤ but there's no OLE container that lets me obtain a handle to an OLE > ¤ document. > ¤ I know you could import COM and ActiveX, but this particular control > ¤ (included in VB6) CANNOT BE IMPORTED NOR INSERTED in .Net. > ¤ Microsoft calls this a "migration issue" and warns us about it, but how, > ¤ then, can I draw an Ole document inside our application (let alone open, > ¤ edit, update, etc)? > ¤ Is Microsoft planning to update this component for VS.Net 2005? Or is there > ¤ an alternative? > ¤ I know I could load an OLE document "the hard way", but those are methods so > ¤ obscure, I get lost before even starting to insert the document in a > ¤ container... If this is the only solution, is there an easy (as easy as this > ¤ can be) example that can lead me to accomplish the insertion of a document > ¤ inside mine? > ¤ I know it can be done, because RTF editor lets you do it. It even lets you > ¤ open and edit the document, and "paste special", but I don't seem to > ¤ accomplish getting a handle to any of those inserted objects... > ¤ Thank you for your time, > ¤ VBen. > ¤ > > I'm not sure whether this will help you but it's the closest support there > control in .NET: give you the functionality> > Visual C++ ActiveX Control for hosting Office documents in Visual Basic or HTML > http://support.microsoft.com/default.aspx?scid=kb;en-us;311765 > > You can also use the Web Browser control but I don't believe that would > you need. in Visual Basic 2005.> > I'm not aware of any consideration for support of an OLE container control Show quoteHide quote > > > Paul ~~~ pclem***@ameritech.net > Microsoft MVP (Visual Basic)
Other interesting topics
How to assign value to Excel 2000 worksheet cell
Simple: Excel Jet 4.0 Link vb 2005 RE: For vs. For Each How to Deserialize to a specific object instance. ENTER and forms Method for finding dotnet version How does IIS or Framework set the Content-Length header ? .net and mysql join Excel process doesn't shut down VS 2002 and Framework 1.0/1.1 SP upgrades |
|||||||||||||||||||||||