As you may already know, the default class for Kinect application in VB environment contains the following method:
In this class (MainWindow.vb) I have decleared some variables as well as TextBoxes which need to be changed/manipulated by another class (Changer.vb) In Changer.vb, I have created this:
The problem is that whenever the compiler reaches Dim mainWin = New MainWindow point, it initiates another instance of that class and consequently runs InitializeComponent() of it which causes the Kinect sensor stop working as its components are already initialized. I do not what it to be reinitialized. I only need to access variables in this class from other classes. Is there any way to do so?
Code:
Public Sub New()
InitializeComponent()
End Sub
Code:
Dim mainWin = New MainWindow
mainWin.TextBox1.Text = hello World