OK, this is ONE way . . .
Create a constructor which will take a reference of the type form1. On your
form create a button and a textbox for demonstration purposes. The Textbox
instance is named TextBox1 in this example.
In the button
Dim ic As New InterpreterClass(Me)
When you press the button you pass the reference to the current form using
'Me' and as you can see in the constructor of the class you can then refer
to the parent form
Public Class InterpreterClass
Sub New(ByVal f As Form1)
f.TextBox1.Text = "Ive just been instantiated"
End Sub
End Class
--
Terry Burns
http://TrainingOn.net
"Jon Masterson" <ne**@scruffyduck.co.uk> wrote in message
news:qh*****************************@40tude.net...
Where is your class defined and instaniated ?
on the form. I had it instantiated in a separate global module but moved
itto the form. What I find odd is that none of the controls on the form
show up in the drop list that appears after form1.
Sorry - not sure I answered that correctly. The class (InterpreterClass)
is defined in it's own file (interpreter.vb) not in the form code. It is
intantiated in the form code along with the other variables for the form:
Public interpreter As New interpreterClass
Jon