How to create an instance of an ActiveX control without placing it on a form

Winanjaya

New member
Joined
Sep 28, 2004
Messages
1
Programming Experience
Beginner
Dear The Expert,
How to create an instance of an ActiveX control without placing it on a form? (ie. to create textbox control in module1.bas) and how to trigger the event?


please advise ..

thanks a lot in advance
 

maxmanzero

Member
Joined
Sep 29, 2004
Messages
12
Programming Experience
Beginner
Code from Module

I created a Module with the following code. It compiled ok but I didn't bother to try and firing the event or passing the instance of the textbox to a form or anything.

Module
MainMod
Public WithEvents text1 As New System.Windows.Forms.TextBox

Public Sub Main()

End Sub

Public Sub text1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles text1.DoubleClick

End Sub

 
Top Bottom