Focusing WebBrowser control in a C# application

前端 未结 4 1676
-上瘾入骨i
-上瘾入骨i 2020-12-20 19:17

I have a WebBrowser control hosted in a windows Form. The control is used to display hyperlinks which get created at runtime. These links point to

4条回答
  •  囚心锁ツ
    2020-12-20 19:46

    In a normal scenario it should be sufficient for you to set the TabIndex of the WebBrowser control to zero. This way, when the form loads the control will be focused and pressing TAB will iterate through the links.

    Note that you should also change the TabIndex of the other controls on the form.

    If this does not solve your problem, you need to add more detail on the complexity of the form hosting the control.

提交回复
热议问题