In Edge IE mode & Active X, the messagebox shown from Modal dialog not focus in default

fang.jiali 1 Reputation point
2021-12-03T08:19:46.753+00:00

I have developed a Active X,

In this Active X, click a button to show a modal dialog, and in this modal dialog, click a button to show a messagebox by call API-MessageBox()

When open this Active X in Edge IE Mode,
the messagebox not focus in default, and can not operate this messagebox by keyboard.

When open this Active X in IE,
the messagebox will focus in default, it is OK.

According to the spy++,
when open this Active X in Edge IE Mode, the message box will receive WM_KILLFOCUS message after shown.

Why?

Microsoft Edge | Microsoft Edge development
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2021-12-06T07:18:40.593+00:00

    Hi @fang.jiali ,

    As far as I know, Edge IE mode supports ActiveX controls except Silverlight. When open this ActiveX control in Edge IE Mode, is there any error message in Devtools? You can use IEChooser to launch the Internet Explorer DevTools to debug the content of your IE mode tabs. To use IEChooser, follow these steps:

    1. Open IEChooser.
      • Open the Run dialog box. For example, press the Windows logo key + R.
        • Enter %systemroot%\system32\f12\IEChooser.exe, and then select Ok.
    2. In IEChooser, select the entry for the IE mode tab.

    In addition, have you tried setting MB_DEFBUTTON, it can set the default focus on the specific button of the message box.

    Best regards,
    Xudong Peng


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.