The Form's .Invoke method has an overloaded version that allows you to pass in an array of Parameters to the function itself. I've just tweaked your code so the check fo InvokeRequired is done inside the Class1.tester method rather than the calling method.
The MethodInvoker delegate doesn't allow for parameters / return types so I've also defined a custom delegate for the tester method.
Public Class Form1
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
filllist()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim t As Threading.Thread = New Threading.Thread(AddressOf filllist)
t.IsBackground = True
t.Start()
End Sub
Private Sub filllist()
Dim i As Integer
For i = 1 To 5000
Class1.tester(i.ToString())
Next
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Class1.OutputForm = Me
End Sub
End Class
Public Class Class1
Public Delegate Function TesterDelegate(ByVal e As String) As Integer
Public Shared OutputForm As Form1
Public Shared Function tester(ByVal e As String) As Integer
If OutputForm.InvokeRequired Then
Dim o() As Object = {e}
Dim mi As New TesterDelegate(AddressOf tester)
OutputForm.Invoke(mi, o)
Else
OutputForm.ListBox1.Items.Add(e)
End If
tester = 0
End Function
End Class
I've changed a couple of other things - the filllist method now calls the .tester method rather than the listbox directly and the Class1 now stores a reference to the output form rather than going through the default instance of Form1.