Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

What to use for Shell.Explorer? 27 Jun 2022 16:32 #22907

  • ic2
  • ic2's Avatar
  • Topic Author


  • Posts: 1661
  • In VO, we have several OLE controls which can show any file format linked in Windows to a specific program with code like this:
    SELF:oDCPreView:CreateEmbedding("Shell.Explorer")
    	SELF:oDCPreView:InitAutoObject()

    As we should replace OLE controls in DotNet, we have for example used the WebView2 where we replace the OLE control with a CustomControl and separately define a WebView2 which is assigned with SetParent using the handle of the customer control, as e.g. in www.xsharp.eu/forum/public-product/2940-...-customcontrol#21933.

    This will probably work for Shell.Explorer situations but I can imagine that there are file types which can't be handled by a webbrowser while Explorer would show them, using the assigned handling program.

    How should we use "CreateEmbedding("Shell.Explorer")" in X#?

    Dick

    Please Log in or Create an account to join the conversation.

    What to use for Shell.Explorer? 27 Jun 2022 16:38 #22908

    • robert
    • robert's Avatar


  • Posts: 3585
  • Dick,

    Shell.Explorer = Internet Explorer
    This is no longer supported by Microsoft
    If you really want to use it, then have a look at the transporting of the email example in the X# help.

    Robert
    XSharp Development Team
    The Netherlands

    Please Log in or Create an account to join the conversation.

    What to use for Shell.Explorer? 27 Jun 2022 17:44 #22912

    • FFF
    • FFF's Avatar


  • Posts: 1419
  • Robert,
    i'd suppose, Dick asks for a replacement of the functionality, not the resurgence of finally dead IE...
    Regards
    Karl (X# 2.15.0.3; Xide 2.15; W8.1/64 German)

    Please Log in or Create an account to join the conversation.

    What to use for Shell.Explorer? 28 Jun 2022 14:06 #22917

    • ic2
    • ic2's Avatar
    • Topic Author


  • Posts: 1661
  • Hello Karl,

    FFF wrote: i'd suppose, Dick asks for a replacement of the functionality, not the resurgence of finally dead IE...


    Indeed that is what I am looking for.
    I have a document module in my program. I can connect any file with a relation and when I click on the browser with linked documents the program executes a
    SELF:oPreview:CreateEmbedding("Shell.Explorer")

    where oPreView is an OLE Webbrowser displayed in one of the panes of a splitwindow.

    Some documents show within the control itself, like a Word document or a JPG file. Some however open in the program where the file extension is associated with, this can depend on the settings. A PDF for example always opens in PDF X Change Viewer (this is because the NPAPI they use is no longer supported in e.g. Firefox ).. An AEF would open in VoPP, an MP4 opens in VLC Media Player.

    If I directly type the filepath in Firefox, I sometimes get a different behavior, in the above examples the doc(x) file opens directly in Word instead of in the browser. Firefox asks me if it should open the file in the specific software or save it.

    E.g. the MP4 / PDF / JPG are directly displayed within Firefox.

    Chromium based Vivaldi, which is my alternative browser, is doing the same as Firefox.

    I expect a similar difference in behavior when I would use WebView2. Difficult to say which is preferable, and if any extension would work in Webview2 (directly or via the software package). Perhaps WebView2 is fine/better for all file formats. But that's why I wondered if there's a DotNet alternative to Shell.Explorer.

    Finally, I think it's a but confusing that it's called Shell.Explorer.. It suggests that Windows Explorer is used, not an ancient Internet Explorer.

    Dick

    Please Log in or Create an account to join the conversation.

    Last edit: by ic2.
    • Page:
    • 1