FileDownload with WebBrowser Control - disable the Save?

S

standish22

want to open a word document stored in my database.

What I do is save the document locally, and then open a new winform
that has the WebBrowser Control on it and navigate to that new file.

This allows the user to manipulate the file and save it. When they
close the WebBrowser, if the contents has changed I save it back to the
db, and delete the local file.

My problem is the "File Download" window that comes up. If the user
clicks Save or Cancel things don't work. I'd like to surpass this
screen altogether, but from what I've read, you can't avoid it.

Is there a way to disable the Save and Cancel buttons? Or at least the
Save button?

Thanks for any suggestions.
 
H

HKSHK

Why don't you just use the shell function and let Windows determine the
proper program?
(e.g. Shell "cmd /c start YourFile.doc")

If the user has Word (or OpenOffice or WordViewer) installed, it will
open the document. This way you don't have to deal with any
"Save/Cancel" dialog.

I once posted a routine for that (in classic VB,
http://groups.google.com/group/micr..._frm/thread/c9dcd7daca02e93f/6f366585997c940f
)
You might want to use that as a reference.

Best Regards,

HKSHK
 
S

standish22

If you use the shell, would you have any way on knowing if the document
is still open or if it has been closed?.

I open the web browser as a showdialog, so the user can't do anything
else in my program, until they are done w/ the document changes and has
closed the document.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top