|
-
Jan 12th, 2008, 02:26 AM
#1
Thread Starter
Junior Member
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....
-
Jan 12th, 2008, 06:58 AM
#2
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.
-
Jan 12th, 2008, 08:38 AM
#3
Thread Starter
Junior Member
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?
-
Jan 12th, 2008, 09:17 AM
#4
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|