-
Open File in .NET
Hello,
process.start("c:\mydoc.doc") is efficient in a way that it will automatically open and run the associated application to open the file, my problem now is, it is possible that the application like MsWord will run under the .net application not in a separate windows? like the OLE, I will just allocate a space in my form and the opened file is viewed in that space?
thanks....
-
Re: Open File in .NET
Yes and no. You can place a WebBrowser control on your form and then navigate it to a Word document. The control uses the IE engine so it can host Office documents. There can be some issues doing it this way though.
There's no other control specifically intended to host Office documents though. You could use the SetParent API to parent the application's main form within yours, but that can cause some issues too.
-
Re: Open File in .NET
thanks john,
Issues you mean problems that will encounter? in that given scenario what is the best way to do it?
-
Re: Open File in .NET
Well, you could always try the SetParent way to see if thats what you're after. take a look. It will display the process window inside a container of your choice, but it'll also display the titlebar with minimize, maximize, and close buttons so you'd have to deal with problems caused by the user minimizing the window while its inside your container. And possibly other issues aswell;)