veebee123
08-09-2009, 10:35 PM
I have a program with plugins. The plugins have to be able to create controls on the host application. I am trying to make an API for my plugins to make it easier to create the controls.
I have created a class module with the following code to make a command button:
Public Sub NewButton(name As CommandButton, sname As String, title As String, w As Integer, h As Integer, x As Integer, y As Integer)
Set name = Form1.Controls.Add("vb.commandbutton", sname)
name.Caption = title
name.Width = w
name.Height = h
name.Left = x
name.Top = y
name.Visible = True
End Sub
Then inside my plugin I can put
BOS.NewButton button, "button", "Plugin Button", 1000, 1000, 0, 0
How can I make the click event inside of the plugin?
I have created a class module with the following code to make a command button:
Public Sub NewButton(name As CommandButton, sname As String, title As String, w As Integer, h As Integer, x As Integer, y As Integer)
Set name = Form1.Controls.Add("vb.commandbutton", sname)
name.Caption = title
name.Width = w
name.Height = h
name.Left = x
name.Top = y
name.Visible = True
End Sub
Then inside my plugin I can put
BOS.NewButton button, "button", "Plugin Button", 1000, 1000, 0, 0
How can I make the click event inside of the plugin?