Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Activex Controls on the same form problems...

Status
Not open for further replies.

fenris

Programmer
May 20, 1999
824
CA
I created a custom Activex control and managed to compile it to an ocx. The control seems to work properly if it is the only one on a form. If I put to controls on the form (I have tried a control array and calling them different names) the controls mess up. The seem to screw up in the events that they raise.

Below is the code in the test project that calls the ocx. If there is only one control it works like it is supposed to. With the two controls as in the code below, the fileDone and ioerror events do not seem to work. It's as if visual basic is confused as to which control raised the event.
'======
Option Explicit


Private Sub cmdCopy_Click()
FileCopy1.Copy
FileCopy2.Copy
End Sub

Private Sub Form_Load()

FileCopy1.SetText "c:\TEMP\test\98112700.h24", "c:\TEMP\98112700.h24"
FileCopy2.SetText "c:\TEMP\test\dwSnowman.avi", "c:\TEMP\dwSnowman.avi"

End Sub

Private Sub filecopy1_fileDone(fName As String)
MsgBox fName
End Sub

Private Sub FileCopy1_ioerror(errMesg As String)
MsgBox errMesg
End Sub

Private Sub filecopy2_fileDone(fName As String)
MsgBox fName
End Sub

Private Sub FileCopy2_ioerror(errMesg As String)
MsgBox errMesg
End Sub


'============

My goal with this control is to get it to work like the winsock control (multi threaded). what would be the best way to reach this goal....

Troy Williams B.Eng.
fenris@hotmail.com

 
Another quick question:

How do I get a custom icon to show up in the components tool bar?

Troy Williams B.Eng.
fenris@hotmail.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top