We use this code to open files such as doc, pdf and html in it's
associated applications, "FileName" is something like
"C:\......\foo.pdf" or "C:\.......\foo.doc".
objProcess = New System.Diagnostics.Process
objProcess.StartInfo.FileName = FileName
objProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal
objProcess.StartInfo.UseShellExecute = True
objProcess.Start()
It worked fine until we noticed that opening and closing some certain
form in our application and then lauching pdf or doc or whatever in
Microsoft apps (IE, Word) causes terrible lags (10-20 seconds!). I
really have no idea, why is that so (lauching through Adobe Acrobat,
Mozilla Firefox works fine, it seems to be a problem in some Microsoft
libraries).
Anyway, we figured out that giving the full path to an application and
the document filename as argument works well, the problem is _how to get
the path to app associated with an extension ?_
I looked a little how the registry is organised, but was hoping someone
has an already tested routine :)
--
Adam Nowotny
JID: daft[at]chrome[dot]pl
GnuPG key 0x42D56D98 at hkp://blackhole.pca.dfn.de