Hi,
I did search the Windows Forms forums here, and found a lot of file association stuff that pertains to the OS; that's not what I'm looking for. I need the file association to stop while the user is using my windows form, but continue using the OS-recognized file association outside of my app. I'm using MS Office Infopath in a hosted application, but for simplicity's sake, I'll use Word as an example in describing my problem.
I have a hosted webbrowser control that defaults to a sharepoint server document library. I want the user to be able to click on a Word document in the library (a document named 'test 555.doc' for example), and when they click on the link, the url of that file, not the webbrowser's statustext field that says "Shortcut to test%20555.doc " (there is white space at the end of the statustext string), but the actual url of the file is returned to my application as a string for future use.
Here's the tricky part. What happens is that even if I call a webbrowser1.stop() immediately after clicking, MS Word will still open. I am trying to stop MS Word from opening, and essentially use the document url string to programatically open the word document in a rich text box (a text box only for argument's sake; I actually have a hosted InfoPath form control on another tab control that is programatically opening an *.xml document that the user clicked on). I am currently having trouble stopping the OS from automatically opening the stand-alone MS Word application, when I intend to handle the document my own way in my app.
I also am having trouble changing the webbrowser control's statustext from "Shortcut to test%20555.doc " into "http://server/folder/test%20555.doc"; I've even tried using a new string variable as a memory swap variable, and I still cannot use the .Replace(string,string) method on it. It won't change.
Any help, criticism, comments, or redirection to better sources of help would be greatly appreciated.
Thanks,
Josiah