Using VB.NET UserControl from VB6  
Author Message
Avy32





PostPosted: .NET Base Class Library, Using VB.NET UserControl from VB6 Top

Hi

I have a VB.NET usercontrol that contains a toolstrip, on that toolstrip I load in runtime 9 toolstripbuttons by code:
tsToolBar.Items.Add(tsButtons(i))
AddHandler tsButtons(i).Click, AddressOf tsButtons_Click
I declare at start of the usercontrol :
Public event ButtonClick() -this event I want to use in VB 6.
How and where I have to raise this event (ButtonClick) that it have same behavior as click on a toolstripbutton
Could anyone help me with that
Thks
Avy




.NET Development29  
 
 
nobugz





PostPosted: .NET Base Class Library, Using VB.NET UserControl from VB6 Top

Try this:

Private Sub tsButton_Click(ByVal sender As Object, ByVal e As EventArgs)
RaiseEvent ButtonClick()
End Sub



 
 
Avy32





PostPosted: .NET Base Class Library, Using VB.NET UserControl from VB6 Top

Thks for your answer but doesn't work.

In VB6 when I click on one button ... it do nothing.Don't even enter on "ButtonClick" event

Thks

Avy