title: Handling property changed from another class in vb.net
body: <p>I have a class like below which contains my global variables as property. I made this "ModelFullPath" from variable to property because i dont know how to raise events with the variable changes.(If you have more logic suggestions i'll appreciate.)</p>
  
  <pre><code>Public Class Globals
      Private Shared _modelfullpath As String = String.Empty
      Public Shared Event ModelPathChanged(ByVal _modelfullpath As String)
  
      Public Shared Property ModelFullPath() As String
          Get
              Return _modelfullpath
          End Get
          Set(ByVal value As String)
              _modelfullpath = value
              RaiseEvent ModelPathChanged(_modelfullpath)
          End Set
      End Property
      Public Shared Sub TestIt() Handles MyClass.ModelPathChanged
          ' Some codes in here
          MessageBox.Show("It Changed")
      End Sub
  End Class
  </code></pre>
  
  <p>In my other class i have "Button2" which gets the string value textbox and sets the my Globals' ModelFullPath property according to textbox1.Text value. On the other hand Button1 is writing Globals.ModelFullPath property to a label1.text value. </p>
  
  <p>In here i'd like to put an event if ModelFullPath is changed, i'd like to make some actions like changing tool's background colors etc. Currently i set it the show "It Changed" with Message Box. But the main problem is i cant handle it from another class like below.</p>
  
  <pre><code>Public Class MainTool
      Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
          Label1.Text = Globals.ModelFullPath
      End Sub
  
      Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
          Globals.ModelFullPath = TextBox1.Text
      End Sub
      Private Sub VariableChanged() Handles Globals.VariableChanged
          Globals.TestIt()
      End Sub
  End Class
  </code></pre>
  
  <p>How can handle <code>Globals.VariableChanged</code> event? Because it doesnt recognize this event.</p>