Search results

  1. A

    Access a form's controls from another class?

    so you're saying i should roll with a module (part 4 of that article)? Friend Module Module1 Friend f1 As Form1 End Module Public Class Class1 Public Sub DoSomeMoreStuff() f1.TextBox1.Text &= "Step 2 is done." & vbCrLf End Sub End Class Are these used a lot in the world?
  2. A

    Access a form's controls from another class?

    Thanks for the tip. I got it to work by passing class1 a referance to the textbox: Public Class Form1 Private Sub logchange(ByVal source As Object, ByVal e As System.IO.FileSystemEventArgs) ... Dim c1 As New Class1() c1.DoSomeMoreStuff(Me.TextBox1) c1 =...
  3. A

    Access a form's controls from another class?

    I have a simple form containing just 1 textbox and calling a separate class. I am having some difficulty getting the class to be able to access the form's controls. I can get 'step 1' to work but not 'step 2'. Public Class Form1 Public watchfolder As System.IO.FileSystemWatcher...
Top Bottom