Results 1 to 7 of 7

Thread: CreateThread by Activex Exe In vb6(Support Shared variables)

Threaded View

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    CreateThread by Activex Exe In vb6(Support Shared variables)

    CreateThread by Activex Exe In vb6(Support Shared variables)
    Code:
    ActivexExeThread.bas
    Public Src As String '主变量
    Public MEM(0) As String
    Public x As Long
    
    Public ABC As Long, X2 As Long
    Public AbcArr(0) As Long
    
    in thread forms:
    Private Sub ShowSrcAbc_Click()
    Dim OldAbc As Long
    'AbcArr(X2)=abc
    'MEM(x) =src
    OldAbc = AbcArr(X2)
    MEM(x) = "test:" & Now
    AbcArr(X2) = AbcArr(X2) + 1
    MsgBox "Src=" & MEM(x) & vbCrLf & "Old Abc=" & OldAbc & vbCrLf & "New ABC=" & AbcArr(X2), , "ThreadID = " & App.ThreadID
    End Sub
    
    in main form:
    MsgBox "Src=" & Src & vbCrLf & "ABC=" & ABC, , "threadid=" & App.ThreadID
    Name:  activex_exe_CreateThread.jpg
Views: 559
Size:  34.7 KBv2CreateThread by Activex Exe In vb6.zip
    Last edited by xiaoyao; Feb 10th, 2020 at 08:07 AM.

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