Link to home
Start Free TrialLog in
Avatar of MarkPerry38
MarkPerry38

asked on

.net Document Viewer Control

Need a control to put on a VB.net form that will allow viewing of various types of documents including Word, Excel, .txt and .pdf
We want this to be read only, and do not want to invoke the associated app

EXACTLY the same question as previously asked on this site (but not bothered about the SQL part), but 9 years later..
https://www.experts-exchange.com/questions/10226625/Document-Viewer-Control.html
original answers no longer exist!

thanks

Mark
Avatar of SQL_SERVER_DBA
SQL_SERVER_DBA
Flag of United States of America image

use the reportviewer
Avatar of MarkPerry38
MarkPerry38

ASKER

but I want to view doc files etc, not sql reports?  
Avatar of Éric Moreau
maybe the WebBrowser control (but for sure the associated application will be started in the background).
thanks emoreau but no, we can't use the WebBrowser control (we are using it now but need to change!) for the very reason you give, and ALSO you can't use the WebBrowser in ReadOnly mode, it locks any documents you are viewing so no-one else can see them
I don't know any other Universal reader then
I doubt very much there is a control that can open each of your files independently of it's associated associated app. There's a reason why the associated app is opened - that's what's used to read the files. Each file is different, and requires different methods for viewing.

Wayne
What's wrong with the associated app opening anyway?
Wayne, we just want a small viewer pane in our application that gives a preview of a selected document, in a folder of docs that needs the user's attention.  The docs can be many types.  If the associated app opens the doc, it's very slow and user has to keep closing apps till he finds the doc he's interested in.  We also lose focus from our app.

We are 70% there using the WebBrowser control, apart from the problems I described in the first place.
As I said, a couple of controls were mentioned in the post I found from 9 years ago, but of course these don't exist any more!

There are apps such as QuickView that do the job, but I don't think it's available as a control to put on a form, which is what we want.

Msrk
ASKER CERTIFIED SOLUTION
Avatar of auyuksel
auyuksel

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks, looks perfect
thanks auyuksel, that looks just the job. you're right, easy to use.  Even though it claims to be a VB5 and C++ solution, the activeX drops on .net forms no problem.
You are welcome Mark. You can use it in .net by focusing on SCCWrap.SCCWindow   methods.