You can use a lambda to capture the requirements and pass them in:
Foo arg = GetTheFoo()
BeginInvoke(New MethodInvoker(Sub() SetFoo(arg)))
Edit:
First, change your method to not pass ByRef
- this is unnecessary:
Private Sub SetFocusToRow(ByVal ultraGridRow As Infragistics.Win.UltraWinGrid.UltraGridRow)
grdSoldeOuverture.ActiveCell = ultraGridRow.Cells(0)
grdSoldeOuverture.PerformAction(Infragistics.Win.UltraWinGrid.UltraGridAction.EnterEditMode)
End Sub
Next, define a delegate:
' Define your delegate:
Delegate Sub SetFocusToRowDelegate(ByVal ultraGridRow As Infragistics.Win.UltraWinGrid.UltraGridRow)
Then you can call via:
BeginInvoke(new SetFocusToRowDelegate(AddressOf SetFocusToRow), arg)