• <i id='1djkc'><tr id='1djkc'><dt id='1djkc'><q id='1djkc'><span id='1djkc'><b id='1djkc'><form id='1djkc'><ins id='1djkc'></ins><ul id='1djkc'></ul><sub id='1djkc'></sub></form><legend id='1djkc'></legend><bdo id='1djkc'><pre id='1djkc'><center id='1djkc'></center></pre></bdo></b><th id='1djkc'></th></span></q></dt></tr></i><div id='1djkc'><tfoot id='1djkc'></tfoot><dl id='1djkc'><fieldset id='1djkc'></fieldset></dl></div>

    <legend id='1djkc'><style id='1djkc'><dir id='1djkc'><q id='1djkc'></q></dir></style></legend>

      <tfoot id='1djkc'></tfoot>
        • <bdo id='1djkc'></bdo><ul id='1djkc'></ul>

      1. <small id='1djkc'></small><noframes id='1djkc'>

      2. 单击 webbrowser html 页面中的链接时显示 VB6 表单

        时间:2023-10-02

        1. <small id='tizRu'></small><noframes id='tizRu'>

            <bdo id='tizRu'></bdo><ul id='tizRu'></ul>
            <i id='tizRu'><tr id='tizRu'><dt id='tizRu'><q id='tizRu'><span id='tizRu'><b id='tizRu'><form id='tizRu'><ins id='tizRu'></ins><ul id='tizRu'></ul><sub id='tizRu'></sub></form><legend id='tizRu'></legend><bdo id='tizRu'><pre id='tizRu'><center id='tizRu'></center></pre></bdo></b><th id='tizRu'></th></span></q></dt></tr></i><div id='tizRu'><tfoot id='tizRu'></tfoot><dl id='tizRu'><fieldset id='tizRu'></fieldset></dl></div>
              <tbody id='tizRu'></tbody>

            <legend id='tizRu'><style id='tizRu'><dir id='tizRu'><q id='tizRu'></q></dir></style></legend>
            <tfoot id='tizRu'></tfoot>
                • 本文介绍了单击 webbrowser html 页面中的链接时显示 VB6 表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用 VB6 WebBrowser,当用户单击 WebBrowser 链接的任何特定链接时,我需要打开一个 vb6 表单,例如

                  I am working with VB6 WebBrowser, Here i need to open a vb6 form when user click any particular link of WebBrowser's link like

                  在 HTML 中

                  <html>
                  <head>
                  <body>
                  <a href="--show vb6 form--">Click To show VB6 Form2</a>
                  </body>
                  </html>
                  

                  我不知道该怎么做.我认为有时可以完成第三个文本文件,例如单击链接时会在文本文件中写入类似 002 的代码.

                  I do't have any idea how to do it. I thought sometime it can be done a third text file like when the link clicked will write a cod like 002 in a text file.

                  vb 格式的 Timer 会每秒检查一次文件,当计时器检测到文件包含 002 时,它会显示该格式.

                  And the in vb form a Timer will check once a second the file, when timer detect the file contains 002 it will show the form.

                  这种方法可以做到吗?还是我能做的其他更短的?

                  Can be do this by this method? or anything else shorter i can except?

                  推荐答案

                  选择一个更好的命名方案,例如:

                  Pick a better naming scheme like:

                  <a href="#vb-showform2">Click To show VB6 Form2</a>
                  <a href="#vb-waffles">Waffles</a>
                  

                  然后通过 BeforeNavigate2 事件拦截链接点击,查看 url,如果它匹配 #vb-* 运行您的代码:

                  Then intercept link clicks via the BeforeNavigate2 event, look at the url and if it matches #vb-* run your code:

                  Private Sub WebBrowserCtrl_BeforeNavigate2(ByVal pDisp As Object, URL As Variant, Flags As Variant, TargetFrameName As Variant, PostData As Variant, Headers As Variant, Cancel As Boolean)
                  
                      '// get #vb-XXX command from url
                      Dim pos As Long: pos = InStrRev(URL, "#vb-")
                  
                      If pos Then
                          Cancel = True '// stop default navigation
                  
                          URL = Mid$(URL, pos + 4)
                  
                          Select Case LCase$(URL)
                              Case "showform2": Form2.Show
                              '...
                              Case "waffles":   MsgBox "Waffles."
                              Case Else:        MsgBox "Unknown Command " & URL
                          End Select
                      End If
                  
                  End Sub
                  

                  这篇关于单击 webbrowser html 页面中的链接时显示 VB6 表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:使 DHTMLEd 控件用弯引号替换直引号的代码 下一篇:任何好的可视化 HTML5 编辑器或 IDE?

                  相关文章

                  <legend id='IQMx9'><style id='IQMx9'><dir id='IQMx9'><q id='IQMx9'></q></dir></style></legend>
                  • <bdo id='IQMx9'></bdo><ul id='IQMx9'></ul>

                  1. <i id='IQMx9'><tr id='IQMx9'><dt id='IQMx9'><q id='IQMx9'><span id='IQMx9'><b id='IQMx9'><form id='IQMx9'><ins id='IQMx9'></ins><ul id='IQMx9'></ul><sub id='IQMx9'></sub></form><legend id='IQMx9'></legend><bdo id='IQMx9'><pre id='IQMx9'><center id='IQMx9'></center></pre></bdo></b><th id='IQMx9'></th></span></q></dt></tr></i><div id='IQMx9'><tfoot id='IQMx9'></tfoot><dl id='IQMx9'><fieldset id='IQMx9'></fieldset></dl></div>

                      <small id='IQMx9'></small><noframes id='IQMx9'>

                      <tfoot id='IQMx9'></tfoot>