Dear Sir,
I have an error `AddressOf' operand must be the name of a method (without parentheses) `
Please Gude me
Thanks
Private Sub ShowBorder(ByVal show As Boolean) Dim action As New Action(Sub() For Each sideShadow In [shadows] sideShadow.Show(show) Next sideShadow If show Then isWindowMinimized = False End If End Sub) If show = True AndAlso isWindowMinimized Then If isAnimationDelayed Then Return End If isAnimationDelayed = True Task.Factory.StartNew(Sub() System.Threading.Thread.Sleep(300) If isAnimationDelayed Then '`Below line code error parentWindow.Invoke(New MethodInvoker(AddressOf action)) End If isAnimationDelayed = False End Sub) Else action() isAnimationDelayed = False End If End Sub
kana250688 says: parentWindow.Invoke(New MethodInvoker(AddressOf action))
parentWindow.Invoke(New MethodInvoker(AddressOf action))
parentWindow.Invoke(
New
MethodInvoker(
AddressOf
action))
Replace above with
parentWindow.Invoke(New EventHandler(AddressOf action))
Or
parentWindow.Invoke(Sub() action())
Invoke the function by AddressOf pointer.
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.