I have a program is basicall using ShowHTML(m.thecontent, "C:\temp\tempfile.htm") to open up a the browser so the user can interact with it. It's working on my dev machine and another workstation with only IE11 as browser but for some reason it doesn't launch on other workstation with other browser installed. Any ideas? So far I have tried the following:
- Default *.htm ( the file that I'm creating ) to IE11
- Default IE11 as default browser on every workstations
Another note, if I open up task manager I can actually see that iexplore.exe is running on the Process tab meaning the program was instantiated but for some reason it's not showing up.
Ideas?
You wrote "it doesn't launch on other workstation with other browser installed"... what other browser does it not work with? ANd what is in the content of the HTML file? Maybe there is script code that needs to load and in other browsers it is considered unsafe. Only guessing based on the information provided.
I have found both Firefox and Chorme to be very stable. IE11 not as much.
ShowHtml()
uses the Windows Shell API which uses Monikers to determine what application gets launched. When you do ShowHtml()
or GoUrl()
it'll use whatever the default browser of the system is. For example, for me Chrome opens for URLs.
If that doesn't work the machine may have a configuration problem with the default browser association. Never really seen that though - usually if something is wrong with the configuration it just defaults back to IE.
I would double check on the users machine to see what the Default Programs and Default Browser setting is set to.
+++ Rick ---
Hi Rick,
That's basically I thought (Default program/browser setting). Is there a way to force it to use IE11 though? I know that there is a 3rd parameter on ShowHTML() but not sure how to use or if that would help though.
Aldrin
No. You have no control what's used for shell ui. That's an OS thing.
But if you want to force using IE you can use InternetExplorer.Application
as a COM object explicitly.
+++ Rick ---
FYI, the issue has been resolved. I'm passing a 3rd parameter on the ShowHTML(m.thecontent, "C:\temp\tempfile.htm", oIEBrow), my OP was incomplete. I just need to make it visible:
oIeBrow=CreateObject("InternetExplorer.Application")
ShowHTML(m.thecontent, "C:\temp\tempfile.htm", oIEBrow)
oIeBrow.visible = .T.