Results 1 to 13 of 13

Thread: best VB6 CreateThread by Chinese(support ocx,Support UserControl)

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,749

    best VB6 CreateThread by Chinese(support ocx,Support UserControl)

    VB6 CreateThread,it can build a com object or form object.
    child thread can use public var ,public object,public ocx.
    we can use more cpu to Show better interface display。
    chinese:中国人发明的最佳的VB6多线程,支持第三方OCX控件,支持”自定义控件“,支持com对象等。
    可能很少有人用到这个功能,但是做到这些那就完美了。
    在多线程中可以共享全局变量,创建窗口,动态添加控件,访问控件,各个子线程之间可以相互调用彼此的对象或控件(注意临界许可证之类就行了).
    用途:比如在一个进程中加载多个Webbrowser控件或表格控件等CPU任务繁重的部件,在多线程中调用他,实现提现,充分利用CPU。
    '-=================
    like
    Code:
    call CreateThread(addressof test)
    sub test()
    dim a as xmlhttp
    dim b as form2
    set b=new form2
    dim c as object
    set c=CreateObject("MSScriptControl.ScriptControl")
    
    dim d as Class1
    set D=NEW class1
    end sub
    no need any tlb,no need any "CreatePrivateObjectByNameInNewThread"

    DOWNLOAD HERE,THE FIRST IS BEST.
    FOR FIX SUPPORT OCX,Running speed is too slow, who can help me change faster, less code?
    Attached Images Attached Images  
    Attached Files Attached Files
    Last edited by xiaoyao; Jan 23rd, 2020 at 01:27 PM. Reason: add chines and english

  2. #2

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,749

    Re: best VB6 CreateThread by Chinese(support ocx,Support UserControl)

    My English is not good, just registered the account of this website, hope to have more experts to communicate with

  3. #3
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,047

    Re: best VB6 CreateThread by Chinese(support ocx,Support UserControl)

    As noted in the other thread, this forum does not allow the posting of compiled code (exe, dll, etc). The rest of the attachments looked like a reasonable project, but I had to remove the attachments. Please edit them to remove the compiled portions, then re-attach. If people want to compile it, they can do so.
    My usual boring signature: Nothing

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,749

    Re: best VB6 CreateThread by Chinese(support ocx,Support UserControl)

    @Shaggy Hiker,sorry,i don't know how to delete one reply when write error info.
    and i also don't know how can i @you,may be only can reply your message ?
    my code for vb6 "CreateThread" is very easy,and it's not the best code(that's only for my work)
    vb6 is the best “Programming development language“,in china ,we Streamline software(VB6.zip),ONLY 10Mb,when setup ok,it's only 30MB.
    VB6 Very compact.
    IT'S SUPPORT MAKE( console program ,STAND STDCALL DLL,COM DLL,ACTIVEX.EXE)
    vb6 is the best,So we don't need to learn (vc,vb.net,c#)

    ------------------------
    aout:
    Yeah, re-attach without the compiled code and it will be fine. It's kind of nice, these days, that we can be fairly multilingual. I looked at your example code, took a few of the Chinese comments, ran them through Google Translate, and was able to read them just fine. That one tool is so useful, these days.
    Last edited by xiaoyao; Jan 23rd, 2020 at 01:07 PM. Reason: eidt words

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,749

    Re: best VB6 CreateThread by Chinese(support ocx,Support UserControl)

    i use vb6 Many years,we can be friend,welcome.
    in china,we have freebasic ide,it's name:visual freebasic.
    download url: http://www.yfvb.com/soft-48.htm

    QQ GROUP:78458582
    IT'S EASY FOR CreateThread ,and it's easy for support make 64 bit exe.
    let's Learning together。
    my QQ:2776478814
    MY EMAIL:xiaoyaocode$163.com ($ change to @)
    Last edited by xiaoyao; Jan 25th, 2020 at 08:15 PM.

  6. #6

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,749

    Re: best VB6 CreateThread by Chinese(support ocx,Support UserControl)

    sometimes,Google Translate will Inaccurate translation.so for best,can i use chinese and english?
    my project code have no Notes,have more chinese Notes.
    if chinese pepole view this word,will study quick.
    因为有时谷歌翻译会出错,表达意思不准确。我有时想写的内容同时用中文和英文。
    我的工程代码里面大部分没有写注释,有很多是中文注释,中国人看到这个贴子时学起来就快了。

  7. #7

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,749

    Re: best VB6 CreateThread by Chinese(support ocx,Support UserControl)

    about: http://www.vbforums.com/showthread.p...reading-a-LOOP
    I've always found the topic of Multi threading somewhat too involved in VB.

    I have a BIG loop of items that process a batch of files. Normally takes 30+ mins to complete.
    Would be nice to be able to figure out how to enable MultiThreading in VB so I could speed up this loop.

    Any templates to get me started?
    ----------------------------
    answer:
    if your cpu like i5 8600k(6 cpu core,Maybe you can you 6 thread or 12 thread)
    you have 10000 plans,put in arr planlist(10000) as string
    so 6 thread use 6 plan,when one thread finished,use plan 7.
    so your cpu will be used for best.
    yor also can view taskmgr.exe(if your cpu only use 30%),you can use 18 threads

  8. #8
    Hyperactive Member
    Join Date
    Apr 2015
    Posts
    356

    Re: best VB6 CreateThread by Chinese(support ocx,Support UserControl)

    Quote Originally Posted by xiaoyao View Post
    VB6 CreateThread,it can build a com object or form object.
    child thread can use public var ,public object,public ocx.
    we can use more cpu to Show better interface display。
    chinese:中国人发明的最佳的VB6多线程,支持第三方OCX控件,支持”自定义控件“,支持com对象等。
    可能很少有人用到这个功能,但是做到这些那就完美了。
    在多线程中可以共享全局变量,创建窗口,动态添加控件,访问控件,各个子线程之间可以相互调用彼此的对象或控件(注意临界许可证之类就行了).
    用途:比如在一个进程中加载多个Webbrowser控件或表格控件等CPU任务繁重的部件,在多线程中调用他,实现提现,充分利用CPU。
    '-=================
    like
    Code:
    call CreateThread(addressof test)
    sub test()
    dim a as xmlhttp
    dim b as form2
    set b=new form2
    dim c as object
    set c=CreateObject("MSScriptControl.ScriptControl")
    
    dim d as Class1
    set D=NEW class1
    end sub
    no need any tlb,no need any "CreatePrivateObjectByNameInNewThread"

    DOWNLOAD HERE,THE FIRST IS BEST.
    FOR FIX SUPPORT OCX,Running speed is too slow, who can help me change faster, less code?

    Dear xiaoyao,


    May be the following msvbvm60 runtime api from msvbvm60.dll of help to you.

    EbLoadRunTime
    EbCreateContext
    EbSetContextWorkerThread

    regards,
    JSVenu

  9. #9
    Hyperactive Member
    Join Date
    Apr 2015
    Posts
    356

    Re: best VB6 CreateThread by Chinese(support ocx,Support UserControl)

    Quote Originally Posted by jsvenu View Post
    Dear xiaoyao,


    May be the following msvbvm60 runtime api from msvbvm60.dll of help to you.

    EbLoadRunTime
    EbCreateContext
    EbSetContextWorkerThread

    regards,
    JSVenu
    Dear xiaoyao,

    You can find how to use the above runtime API at the following link.

    https://www.planet-source-code.com/v...50144&lngWId=1

    Here even the free threading component and various threading examples are given.
    But ASM is also used along with VB6 for generating the free threading component using above apis.I have less knowledge in ASM.
    You can take a look here and may take support of Trick for any help regarding multithreading .


    regards,
    JSVenu
    Last edited by jsvenu; Jan 25th, 2020 at 08:47 AM.

  10. #10

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,749

    Re: best VB6 CreateThread by Chinese(support ocx,Support UserControl)

    method2by friend:The trick) stand exe-thread ,can't support (usercontrols),how to fix it?

    how to add usecontrols on form object in thread?
    (your project can add ocx,but can't support vb6 usercontrol)


    1,make ocx (TestOCX.vbp)
    2,make exe(#FormThreading.vbp)
    run exe

    Code:
    Private obj As Object
    
    Private Sub Command1_Click()
    On Error GoTo ERR
    
    Set obj = Me.Controls.Add("Project1.UserControl1", "UserControl1B")
    obj.Visible = True
    MsgBox obj.Width
      Exit Sub
    ERR:
      MsgBox "ERR:" & ERR.Number & "," & ERR.Description
    End Sub
    
    sub test2
    Dim ctlName As Control
    Set ctlName = Form1.Controls.Add("Project1.UserControl1", "Text1", Form1)
    ctlName.Visible = True
    end sub
    Attached Files Attached Files

  11. #11

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,749

    Re: best VB6 CreateThread by Chinese(support ocx,Support UserControl)

    I think there will always be a way ,no need tls?
    a simple method for support show forms with vb6 usercontrol ot ocx in thread.

  12. #12
    Junior Member
    Join Date
    Mar 2016
    Posts
    16

    Re: best VB6 CreateThread by Chinese(support ocx,Support UserControl)

    Interesting that my initial work with fakeheader on chinese VBGood is still alive It's been long time since I've been there, but it was very good VB forum. I am pleased

  13. #13

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    3,749

    Re: best VB6 CreateThread by Chinese(support ocx,Support UserControl)

    yes ,but trick make a new method for creatThead,YOU CAN TRY,IT'S BETTER THAN fakeheader

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