Results 1 to 24 of 24

Thread: Chrome OCX,Miniblink,VB6 chromium,Chrome core only one dll

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Resolved Chrome OCX,Miniblink,VB6 chromium,Chrome core only one dll

    download ocx miniblinkx_ocx.zip
    download node.dll from here:
    https://github.com/weolar/miniblink49/releases
    GitHub - imxcstar/vb6-miniblink-SBrowser: Miniblink control made with vb6 encapsulates all APIs of miniblink free version
    https://github.com/imxcstar/vb6-miniblink-SBrowser

    GitHub - weolar/miniblink49: a lighter, faster browser kernel of blink to integrate HTML UI in your app. A small, lightweight browser kernel to replace wke和libcef
    https://github.com/weolar/miniblink49

    Miniblink - Free small open source browser control
    https://miniblink.net/index.html

    Everyone has been waiting, miniblink is finally open sourced! ! - Know almost
    https://zhuanlan.zhihu.com/p/22663686


    Miniblink: the world's smallest Chrome-based browser control-VBForums
    https://www.vbforums.com/showthread....ight=miniblink

    test code:
    Code:
    SBrowser1.LoadHtml "<font color='red'>ocx test </font>"
    
    SBrowser1.Visible = True
    SBrowser1.LoadURL "http://www.baidu.com"
    '"http://127.0.0.1:83/webForm.htm"
    PLEASE input value or click by JAVASCRIPT:
    Code:
    Private Sub Command4_Click()
    SBrowser1.RunJs "document.getElementById(""name1"").value='abc123'"
    MsgBox "check"
    SBrowser1.RunJs "document.getElementById(""submit1"").click()"
    MsgBox "Web Form Value=" & SBrowser1.RunJs("return document.getElementById(""name1"").value")
    End Sub
    Carefully packaged, easy to call code:
    Code:
    Function GetValueByid(ID As String) As String
        GetValueByid = SBrowser1.RunJs("return document.getElementById(""" & ID & """).value")
    End Function
    Function ClickWebID(ID As String) As String
        ClickWebID = SBrowser1.RunJs("document.getElementById('" & ID & "').click();return 'ok'")
    End Function
    Function SetValueByid(ID As String, Value As String) As String
        SetValueByid = SBrowser1.RunJs("document.getElementById('" & ID & "').value='" & Value & "' ;return 'ok'")
    End Function
    
    Private Sub Command5_Click()
    MsgBox "GetValueByid result=" & GetValueByid("name1")
    MsgBox "SetValueByid result=" & SetValueByid("name1", "abc123")
     'MsgBox "ClickWebID result=" & ClickWebID("submit1")
    MsgBox "ClickWebID('submit1') result=" & ClickWebID("submit1")
    MsgBox "ClickWebID('submit2') result=" & ClickWebID("submit2")
    End Sub
    HTM CODE FOR TEST:
    NEED SAVE HTM FILE WITH UTF8 FORMAT (<meta charset="UTF-8">)
    Code:
    <!DOCTYPE html>
      <html>
      <head>
      <meta charset="UTF-8">
      <script>
      function quzhi() {
      var text1 = document.getElementById("name1").value; //取得文本框的值
    document.getElementById("name2").value=text1;
      alert(text1);//网页提示框
      }
     
      </script>
      </head>
      <body>
      <input type="text" id="name1" value="joy">
      <input type="text" id="name2" value="">
      <br />
      <input type="button" value="GetValue,Put to 'name2'" onclick="quzhi()" id="submit1">
      </body>
      </html>
    download ocx miniblinkx_ocx.zip
    Last edited by xiaoyao; Mar 10th, 2021 at 08:14 PM. Reason: title change

  2. #2

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: VB6 chromium,Chrome core only one dll

    Miniblink for Freebasic:

    miniblink for vfb(visual freebasic),ide like vb6,vb7.support x64,createthread,asm code
    (94) Vfb IDE【Visual Freebasic】Like vb6,vb7,Update2021-2-23 - freebasic.net
    https://www.freebasic.net/forum/view...hp?f=8&t=28522
    download vfb ide:
    https://github.com/xiaoyaocode163/VisualFreeBasic
    http://www.yfvb.com/soft-48.htm (version 5.5.3,update:2021-2-23)

    Code:
    Sub Form1_WM_Create(hWndForm As hWnd ,UserData As Integer)  '完成创建窗口及所有的控件后,此时窗口还未显示。注:自定义消息里 WM_Create 此时还未创建控件和初始赋值。
       wkeJsBindFunction("eMsg" ,@OnMsg ,null ,5)
       wkeJsBindFunction("eShellExec" ,@OnShellExec ,NULL ,3)
       Miniblink1.LoadFile(App.Path & "view\index.html")
    End Sub
    
    Sub Form1_WM_Size(hWndForm As hWnd ,fwSizeType As Long ,nWidth As Long ,nHeight As Long)  '窗口已经改变了大小
       'fwSizeType = SIZE_MAXHIDE     SIZE_MAXIMIZED   SIZE_MAXSHOW    SIZE_MINIMIZED    SIZE_RESTORED
       ''            其他窗口最大化   窗口已最大化     其他窗口恢复    窗口已最小化      窗口已调整大小
       'nWidth nHeight  是客户区大小,不是全部窗口大小。
       if fwSizeType = SIZE_MINIMIZED Then Return
       'xxx.Move AfxScaleX(5), AfxScaleY(5), nWidth - AfxScaleX(10), nHeight - AfxScaleY(30)
       Miniblink1.Move 0 ,0 ,nWidth ,nHeight
    End Sub
    
    Function onMsg cdecl(es As jsExecState ,param As Any Ptr) as jsValue
       '注意,必须加 cdecl ,这是 Miniblink调用约定
       dim argCount As Integer = jsArgCount(es)
       if argCount < 1 Then return jsUndefined()
       Dim ntype As jsType = jsArgType(es ,0)
       if ntype <> JSTYPE_STRING Then return jsUndefined()
       Dim arg0      As jsValue = jsArg(es ,0)
       Dim msgOutput As String  = "eMsg:"
       Dim nmsg       As String  = *jsToTempString(es ,arg0)
       msgOutput = msgOutput + nmsg
       PrintA msgOutput
       Select Case nmsg
          Case "close"
             Me.Close
          Case "max"
             Me.WindowState = 2 '最大化
          Case "min"
             Me.WindowState = 1 '最小化
       End Select
       return jsUndefined()
       
    End Function
    
    Function onShellExec cdecl(es As jsExecState,param As Any Ptr) as jsValue
       '注意,必须加 cdecl ,这是 Miniblink调用约定
       if jsArgCount(es) = 0 Then return jsUndefined()
       Dim arg0      As jsValue = jsArg(es ,0)
       if jsIsString(arg0) = 0 Then return jsUndefined()
       Dim path As String = *jsToTempStringW(es, arg0)
       if path = "runEchars" Then 
    '       createECharsTest()
       ElseIf path = "wkeBrowser" Then
    '        wkeBrowserMain(nullptr, nullptr, nullptr, TRUE)
       End if 
       PrintA path
       return jsUndefined()
           
    End Function
    Name:  miniblink_vfbShowHtm.jpg
Views: 5165
Size:  53.7 KB
    Last edited by xiaoyao; Mar 10th, 2021 at 06:47 AM.

  3. #3
    Lively Member
    Join Date
    Aug 2017
    Posts
    78

    Re: VB6 chromium,Chrome core only one dll

    Quote Originally Posted by xiaoyao View Post
    GitHub - imxcstar/vb6-miniblink-SBrowser: Miniblink control made with vb6 encapsulates all APIs of miniblink free version
    https://github.com/imxcstar/vb6-miniblink-SBrowser

    Miniblink: the world's smallest Chrome-based browser control-VBForums
    https://www.vbforums.com/showthread....ight=miniblink
    the problem is that it does not have multimedia support (youtube, mp3, etc.)

  4. #4
    Addicted Member
    Join Date
    Mar 2016
    Posts
    224

    Re: VB6 chromium,Chrome core only one dll

    i cant run it, everything in Chinese
    even i changed files names from Chinese to English but failed
    anyone can send English copy here in archive?

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: VB6 chromium,Chrome core only one dll

    1,make ocx from SBrowser_G.vbp
    2,test vb6 project
    COPY SBrowser_G_202.ocx TO HERE
    COPY node.dll TO HERE

    Forward: The story behind Miniblink

    Chief browser architecture bragger, the world's smallest chromium kernel-author of miniblink

    Miniblink is my hard work for 3 years, taking advantage of nothing to do during the Chinese New Year, I turned out a PPT I wrote before. It roughly talks about the origin and architecture of miniblink.

    Another point to mention is that the latest code of miniblink is gradually not open source (but if there are bugs, it will still be merged into the open source branch). Don't spray me, I have been open source and have been committing code every day for two years. Suddenly making this decision last year, I also feel very uncomfortable. There are two main reasons. One is that there is a forum that changed my code or even the official website a few words and turned it into his result, which was very uncomfortable. The second point, the key is, I found that the open source code is produced by many hui, squeezing wool, directly used for modification, and then used for illegal purposes. Even people from Baidu came to me and asked if I did this...Of course, the guy who asked was a colleague of my colleague, not to warn me.

    Based on the above two points, especially the second point, I dare not open source. A small, single-file, single-process browser kernel. At first, I just wanted to do the interface and the work related to browsing some web pages. For example, for OA systems, industrial controls and other more formal uses. But I didn’t expect to be able to produce a lot of tricks produced in Hui...

    The good news is that the code for the Android version of miniblink has now been written, and it has to be adapted to more models.

    My plan is to move electron to the mobile terminal. Electron has not supported mobile all the time, which I have to say is a big pity. If minibink can make up for this shortcoming, I think what the swollen swollen who sprays electron every day will say, clam.

    However, on Apple, due to policy restrictions, only v8 without jit. The performance problem is estimated to be large. It is said that only 50% of the original. In this area, I want to study if there is a way to compile js directly into bin. If it does happen, then the web app will explode.
    Attached Files Attached Files
    Last edited by xiaoyao; Mar 10th, 2021 at 06:54 AM.

  6. #6

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: VB6 chromium,Chrome core only one dll

    Quote Originally Posted by geekmaro View Post
    i cant run it, everything in Chinese
    even i changed files names from Chinese to English but failed
    anyone can send English copy here in archive?
    Code:
    Private WithEvents mb_callback As MiniblinkCallBack
    Private mb_api As New MiniblinkAPI
    Private mb As Long
    
    Private Sub Command1_Click()
    LOADWEB1
    End Sub
    
    Private Sub Form_Load()
    'COPY SBrowser_G_202.ocx TO HERE
    'COPY node.dll TO HERE
        Set mb_callback = New MiniblinkCallBack
    End Sub
    Private Sub Command2_Click()
    'ADD OCX TO FORM1 (SBrowser1),SET Visible=FALSE ON LOAD
    
    SBrowser1.Visible = True
    SBrowser1.LoadURL "http://www.baidu.com"
    End Sub
    
     
    Sub LOADWEB1()
        Me.ScaleMode = 3
        
        mb_api.wkeInitializeEx 0
        
        mb_api.wkeJsBindFunction "test", mb_callback.wkeJsNativeFunction, 0, 2               'js回调事件绑定(影响所有webview和webwindow)
        
        mb = mb_api.wkeCreateWebWindow(2, Me.hWnd, 0, 0, Me.ScaleWidth, Me.ScaleHeight)
        MsgBox "mb=" & mb
        mb_api.wkeShowWindow mb, True
        
        mb_api.wkeOnLoadUrlBegin mb, mb_callback.wkeLoadUrlBeginCallback, 0                  'url加载事件绑定
        mb_api.wkeOnCreateView mb, mb_callback.wkeCreateViewCallback, 0                      '创建新窗口事件绑定
        mb_api.wkeOnDownload mb, mb_callback.wkeDownloadCallback, 0                          '下载事件绑定
        
        mb_api.wkeLoadURL mb, "http://www.baidu.com"
    End Sub
    
    
    Private Sub mb_callback_wkeCreateViewCallback(ByVal webView As Long, ByVal param As Long, ByVal navigationType As SBrowser_G_202.wkeNavigationType, ByVal url As String, windowFeatures As SBrowser_G_202.wkeWindowFeatures)
        Debug.Print "Event_wkeCreateViewCallback"
        mb_callback.Return_wkeCreateViewCallback = webView      '使用原webview加载
    
    End Sub
    
    'Private Sub mb_callback_wkeCreateViewCallback(ByVal webView As Long, ByVal param As Long, ByVal navigationType As SBrowser_G.wkeNavigationType, ByVal url As String, windowFeatures As SBrowser_G.wkeWindowFeatures)
    '    Debug.Print "触发了wkeCreateViewCallback"
    '    mb_callback.Return_wkeCreateViewCallback = webView      '使用原webview加载
    'End Sub
    
    Private Sub mb_callback_wkeDownloadCallback(ByVal webView As Long, ByVal param As Long, ByVal url As String)
        Debug.Print "downLoad event:" & url
        'Debug.Print "触发了下载事件,下载地址:" & url
    End Sub
    
    Private Sub mb_callback_wkeJsNativeFunction(ByVal es As Long, ByVal param As Long)
        Dim tret1 As Currency, tret2 As Currency
        tret1 = mb_api.jsArg(es, 0)
        tret2 = mb_api.jsArg(es, 1)
        MsgBox mb_api.jsToTempStringW(es, tret1) & "/" & mb_api.jsToTempStringW(es, tret2)
    End Sub
    
    Private Sub mb_callback_wkeLoadUrlBeginCallback(ByVal webView As Long, ByVal param As Long, ByVal url As String, ByVal job As Long)
        Debug.Print url
    End Sub
    
    Private Sub T1_Click()
        mb_api.wkeRunJSW mb, "window.test('xcv','abc123');"
        'mb_api.wkeRunJSW mb, "window.test('xcv','hj自行车5gj');"
    End Sub

  7. #7

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: VB6 chromium,Chrome core only one dll

    Quote Originally Posted by geekmaro View Post
    i cant run it, everything in Chinese
    even i changed files names from Chinese to English but failed
    anyone can send English copy here in archive?

    you can try,and give some money,thank you
    Code:
    SBrowser1.LoadHtml "<font color='red'>ocx test </font>"
    Last edited by xiaoyao; Mar 9th, 2021 at 08:33 AM.

  8. #8
    Lively Member
    Join Date
    Sep 2016
    Location
    Germany, Bavaria
    Posts
    77

    Re: VB6 chromium,Chrome core only one dll

    Hi,
    the project is very interesting. It only works here in the Exe (W7-64), in the IDE does not work. I also tested JavaScript with Sencha ExtJS, all ok.
    Greeting W. Wolf

  9. #9

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: VB6 chromium,Chrome core only one dll

    Quote Originally Posted by wwolf View Post
    Hi,
    the project is very interesting. It only works here in the Exe (W7-64), in the IDE does not work. I also tested JavaScript with Sencha ExtJS, all ok.
    Greeting W. Wolf

    maybe you need Recompile and generate controls (SBrowser_G_202.ocx),and run in ide
    you can put SBrowser_G_202.ocx ,node.dll,Ocx_test.vbp,and exe together in same path
    Last edited by xiaoyao; Mar 9th, 2021 at 11:09 AM.

  10. #10
    Addicted Member
    Join Date
    Mar 2016
    Posts
    224

    Re: VB6 chromium,Chrome core only one dll

    Quote Originally Posted by xiaoyao View Post
    maybe you need Recompile and generate controls (SBrowser_G_202.ocx),and run in ide
    you can put SBrowser_G_202.ocx ,node.dll,Ocx_test.vbp,and exe together in same path
    how to get fill a form inside your browser?
    i tried:
    SBrowser1.Document.GetElementById("userName").Value = "user123"
    SBrowser1.Document.GetElementById("continue").Click
    but it does not work

  11. #11

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: VB6 chromium,Chrome core only one dll

    I will have a test. Don't forget your money, ha ha

    I need to spend a lot of time debugging and writing code packaging, please wait
    Last edited by xiaoyao; Mar 10th, 2021 at 05:37 AM.

  12. #12
    Addicted Member
    Join Date
    Mar 2016
    Posts
    224

    Re: VB6 chromium,Chrome core only one dll

    Quote Originally Posted by xiaoyao View Post
    I will have a test. Don't forget your money, ha ha
    i will pay when u show me how to fill form
    i dont need just go url, i need to fill form and click buttons

  13. #13
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    6,735

    Re: VB6 chromium,Chrome core only one dll

    Quote Originally Posted by xiaoyao View Post
    I will have a test. Don't forget your money, ha ha
    You copy the work of everyone and you are asking money???

  14. #14
    Addicted Member
    Join Date
    Mar 2016
    Posts
    224

    Re: VB6 chromium,Chrome core only one dll

    Quote Originally Posted by Arnoutdv View Post
    You copy the work of everyone and you are asking money???
    i told him in pm, if browser work i will pay you

  15. #15

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: VB6 chromium,Chrome core only one dll

    i Spent a lot of time dealing with this matter,Use my experience, skills, and knowledge accumulation

    two days ago,he say want to buy something,and need my help on 20201-3-8,now is 2021-3-10.
    not much money, just a little labor remuneration.
    Last edited by xiaoyao; Mar 10th, 2021 at 05:00 AM.

  16. #16

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: VB6 chromium,Chrome core only one dll

    In American restaurants, waiters serve food, help you open the door and charge a tip. This is something that has never happened in China.
    Others need your service, and indicate how much you will pay, and ask you to help him work. This is not a tip, but a task, a temporary job.

    In some other people’s posts, I replied to questions with the same keywords, such as the CDECL API call. I did not make a cent from it, but instead spent several thousand yuan in costs. Just want to study this technology thoroughly, I also searched and learned more than 10 related methods. Some are too slow, and some have too much code. I just think that purely binding with a VB function is the fastest and most convenient way to run.

  17. #17

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: VB6 chromium,Chrome core only one dll

    PLEASE input value or click by JAVASCRIPT:
    Code:
    Private Sub Command4_Click()
    SBrowser1.RunJs "document.getElementById(""name1"").value='abc123'"
    MsgBox "check"
    SBrowser1.RunJs "document.getElementById(""submit1"").click()"
    MsgBox "Web Form Value=" & SBrowser1.RunJs("return document.getElementById(""name1"").value")
    End Sub
    Carefully packaged, easy to call code:
    Code:
    Function GetValueByid(ID As String) As String
        GetValueByid = SBrowser1.RunJs("return document.getElementById(""" & ID & """).value")
    End Function
    Function ClickWebID(ID As String) As String
        ClickWebID = SBrowser1.RunJs("document.getElementById('" & ID & "').click();return 'ok'")
    End Function
    Function SetValueByid(ID As String, Value As String) As String
        SetValueByid = SBrowser1.RunJs("document.getElementById('" & ID & "').value='" & Value & "' ;return 'ok'")
    End Function
    
    Private Sub Command5_Click()
    MsgBox "GetValueByid result=" & GetValueByid("name1")
    MsgBox "SetValueByid result=" & SetValueByid("name1", "abc123")
     'MsgBox "ClickWebID result=" & ClickWebID("submit1")
    MsgBox "ClickWebID('submit1') result=" & ClickWebID("submit1")
    MsgBox "ClickWebID('submit2') result=" & ClickWebID("submit2")
    End Sub
    HTM CODE FOR TEST:
    NEED SAVE HTM FILE WITH UTF8 FORMAT (<meta charset="UTF-8">)
    Code:
    <!DOCTYPE html>
      <html>
      <head>
      <meta charset="UTF-8">
      <script>
      function quzhi() {
      var text1 = document.getElementById("name1").value; //取得文本框的值
    document.getElementById("name2").value=text1;
      alert(text1);//网页提示框
      }
     
      </script>
      </head>
      <body>
      <input type="text" id="name1" value="joy">
      <input type="text" id="name2" value="">
      <br />
      <input type="button" value="GetValue,Put to 'name2'" onclick="quzhi()" id="submit1">
      </body>
      </html>
    Last edited by xiaoyao; Mar 10th, 2021 at 08:13 PM.

  18. #18

  19. #19

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: VB6 chromium,Chrome core only one dll

    Quote Originally Posted by The trick View Post
    Most of the community publishes their work here for free without receiving a cent for it.
    The free lunch is of course the best. But there are some things that no one can help you with when you spend money. I have been asking the question of cdecl for several months, and your method is considered the most convenient. Call cdecl api (function address, parameter 1, parameter 2, additional extra parameters), the other is your vb6 plug-in add-in, which is the most perfect, I am afraid that there will be BUG instability, memory CPU and so on.
    The way I am binding fixcdecl_ to the vb function is to refer to your design and make improvements (the disadvantage is that each function needs to be added with a balanced stack parameter). But it is not stable in the IDE. It must be fully compiled and run. If the code is changed a few lines, it will run wrong, so I added the method of using UseCallWindowProc to call the cdecl function with any number of parameters in the IDE.
    A Chinese friend of mine used to pay him, and he developed a method for me that does not require extra parameters. Unfortunately, this code was lost last year.
    He helped me develop it, and I want to pay him another money to help me develop it again, but unfortunately he can't develop it.
    Sometimes the money can't be solved, that's the biggest headache.

    if i pay 50$,can you help me?
    asm for any call cdecl,stdcall.like this
    cdecl api :add(a,b)
    vbcode :
    function vb_add(byval a as long,byval b as long ) as long
    'writeprocessmemory asm code
    end function
    Last edited by xiaoyao; Mar 10th, 2021 at 06:26 AM.

  20. #20
    Addicted Member
    Join Date
    Mar 2016
    Posts
    224

    Re: VB6 chromium,Chrome core only one dll

    Quote Originally Posted by xiaoyao View Post
    PLEASE input value or click by JAVASCRIPT:
    Code:
    Private Sub Command4_Click()
    SBrowser1.RunJs "document.getElementById(""name1"").value='abc123'"
    MsgBox "check"
    SBrowser1.RunJs "document.getElementById(""submit1"").click()"
    MsgBox "Web Form Value=" & SBrowser1.RunJs("return document.getElementById(""name1"").value")
    End Sub
    Carefully packaged, easy to call code:
    Code:
    Function GetValueByid(ID As String) As String
        GetValueByid = SBrowser1.RunJs("return document.getElementById(""" & ID & """).value")
    End Function
    Function ClickWebID(ID As String) As String
        ClickWebID = SBrowser1.RunJs("document.getElementById('" & ID & "').click();return 'ok'")
    End Function
    Function SetValueByid(ID As String, Value As String) As String
        SetValueByid = SBrowser1.RunJs("document.getElementById('" & ID & "').value='" & Value & "' ;return 'ok'")
    End Function
    
    Private Sub Command5_Click()
    MsgBox "GetValueByid result=" & GetValueByid("name1")
    MsgBox "SetValueByid result=" & SetValueByid("name1", "abc123")
     'MsgBox "ClickWebID result=" & ClickWebID("submit1")
    MsgBox "ClickWebID('submit1') result=" & ClickWebID("submit1")
    MsgBox "ClickWebID('submit2') result=" & ClickWebID("submit2")
    End Sub
    HTM CODE FOR TEST:

    Code:
    <!DOCTYPE html>
      <html>
      <head>
      <meta charset="UTF-8">
      <script>
      function quzhi() {
      var text1 = document.getElementById("name1").value; //取得文本框的值
    document.getElementById("name2").value=text1;
      alert(text1);//网页提示框
      }
     
      </script>
      </head>
      <body>
      <input type="text" id="name1" value="joy">
      <input type="text" id="name2" value="">
      <br />
      <input type="button" value="GetValue,Put to 'name2'" onclick="quzhi()" id="submit1">
      </body>
      </html>
    i have a problem
    i copied your code and tested it
    but it does not validate the input
    i had to click on button to fill form, wait for form the show error: fields not filled, and then i click button to fill form
    how to fix this ?
    fix it, and i will pay double $100

  21. #21

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: Chrome OCX,Miniblink,VB6 chromium,Chrome core only one dll

    web page need run by iis or php.
    url=127.0.0.1 or http://*
    SBrowser1.LoadURL "http://www.baidu.com"
    '"http://127.0.0.1:83/webForm.htm"

  22. #22

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: VB6 chromium,Chrome core only one dll

    Quote Originally Posted by geekmaro View Post
    i have a problem
    i copied your code and tested it
    but it does not validate the input
    i had to click on button to fill form, wait for form the show error: fields not filled, and then i click button to fill form
    how to fix this ?
    I TEST FOR THIS,IT'S SUCCESSFULL
    Code:
    COMMAND_CLICK()
    SBrowser1.LoadURL App.Path & "\input_TestWebForm.htm"
    'NEED SAVE HTM FILE WITH UTF8 FORMAT (<meta charset="UTF-8">)
    
    COMMAND_CLICK()
    SBrowser1.RunJs "document.getElementById(""name1"").value='abc123'"
    MsgBox "check"
    SBrowser1.RunJs "document.getElementById(""submit1"").click()"
    MsgBox "Web Form Value=" & SBrowser1.RunJs("return document.getElementById(""name1"").value")
    download :input_TestWebForm.zip
    Last edited by xiaoyao; Mar 10th, 2021 at 08:11 PM.

  23. #23
    Lively Member
    Join Date
    Aug 2017
    Posts
    78

    Re: Chrome OCX,Miniblink,VB6 chromium,Chrome core only one dll

    Quote Originally Posted by xiaoyao View Post
    download ocx miniblinkx_ocx.zip
    download node.dll from here:
    https://github.com/weolar/miniblink49/releases
    GitHub - imxcstar/vb6-miniblink-SBrowser: Miniblink control made with vb6 encapsulates all APIs of miniblink free version
    https://github.com/imxcstar/vb6-miniblink-SBrowser

    GitHub - weolar/miniblink49: a lighter, faster browser kernel of blink to integrate HTML UI in your app. A small, lightweight browser kernel to replace wke和libcef
    https://github.com/weolar/miniblink49

    Miniblink - Free small open source browser control
    https://miniblink.net/index.html

    Everyone has been waiting, miniblink is finally open sourced! ! - Know almost
    https://zhuanlan.zhihu.com/p/22663686


    Miniblink: the world's smallest Chrome-based browser control-VBForums
    https://www.vbforums.com/showthread....ight=miniblink

    test code:
    Code:
    SBrowser1.LoadHtml "<font color='red'>ocx test </font>"
    
    SBrowser1.Visible = True
    SBrowser1.LoadURL "http://www.baidu.com"
    '"http://127.0.0.1:83/webForm.htm"
    PLEASE input value or click by JAVASCRIPT:
    Code:
    Private Sub Command4_Click()
    SBrowser1.RunJs "document.getElementById(""name1"").value='abc123'"
    MsgBox "check"
    SBrowser1.RunJs "document.getElementById(""submit1"").click()"
    MsgBox "Web Form Value=" & SBrowser1.RunJs("return document.getElementById(""name1"").value")
    End Sub
    Carefully packaged, easy to call code:
    Code:
    Function GetValueByid(ID As String) As String
        GetValueByid = SBrowser1.RunJs("return document.getElementById(""" & ID & """).value")
    End Function
    Function ClickWebID(ID As String) As String
        ClickWebID = SBrowser1.RunJs("document.getElementById('" & ID & "').click();return 'ok'")
    End Function
    Function SetValueByid(ID As String, Value As String) As String
        SetValueByid = SBrowser1.RunJs("document.getElementById('" & ID & "').value='" & Value & "' ;return 'ok'")
    End Function
    
    Private Sub Command5_Click()
    MsgBox "GetValueByid result=" & GetValueByid("name1")
    MsgBox "SetValueByid result=" & SetValueByid("name1", "abc123")
     'MsgBox "ClickWebID result=" & ClickWebID("submit1")
    MsgBox "ClickWebID('submit1') result=" & ClickWebID("submit1")
    MsgBox "ClickWebID('submit2') result=" & ClickWebID("submit2")
    End Sub
    HTM CODE FOR TEST:
    NEED SAVE HTM FILE WITH UTF8 FORMAT (<meta charset="UTF-8">)
    Code:
    <!DOCTYPE html>
      <html>
      <head>
      <meta charset="UTF-8">
      <script>
      function quzhi() {
      var text1 = document.getElementById("name1").value; //取得文本框的值
    document.getElementById("name2").value=text1;
      alert(text1);//网页提示框
      }
     
      </script>
      </head>
      <body>
      <input type="text" id="name1" value="joy">
      <input type="text" id="name2" value="">
      <br />
      <input type="button" value="GetValue,Put to 'name2'" onclick="quzhi()" id="submit1">
      </body>
      </html>
    download ocx miniblinkx_ocx.zip
    Would it be possible to make available the paid version that has multimedia? What the value ? How do I buy it ?

  24. #24
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,375

    Re: Chrome OCX,Miniblink,VB6 chromium,Chrome core only one dll

    This thread has gone off the rails with you now soliciting for money.

    I'm going to close this.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width