Results 1 to 40 of 58

Thread: VB6 Threaded Forms (simple Demo)

Threaded View

  1. #11
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: VB6 Threaded Forms (simple Demo)

    how to add usercontrols on forms object in thread?
    (your project can add ocx,but can't support vb6 usercontrol)
    Code:
    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
    download【http://www.vbforums.com/attachment.p...059696】
    Last edited by xiaoyao; Jan 26th, 2020 at 08:47 PM. Reason: wrong word,fix ok

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