Delay Usage Via Vb.Net in Invoke Code

Hi all,

I need to use delay,screenshot and more via VB.Net in invoke code. but i couldn’t get it. How can i manage that. This is my code and getting an error.

Dim myDelay As Delay
Dim setTime As TimeSpan

myDelay.Duration(setTime.Milliseconds(5000))

The error is that : ‘Public Overloads ReadOnly Property Milliseconds As Integer’ has no parameters and its return type cannot be indexed. And i got timespan error to.
So, how can i do via using vb.net??

NOT : I have to use code no activity !!!

Thanks.

Hello @yigit.aybey ,

Do not use “Dim” to declare a variable. Instead of “Dim”, please use the arguments of the invoke activity.

Please check this linkehttps://docs.uipath.com/activities/docs/invoke-code . You have an example about how the activity works.

Hope it helsp!
Best regards,
Marius

Hi,

i handle it somehow via using threading method but i do not know how to do with for screenshot or any other activities. For my first priority is using screenshot via vb.net.

Thanks.