Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
VB.Net
#2
I don't know much VB.Net, but I'm good with C#, so what I can see from this:
'AddressOf' expression cannot be converted to 'Long' because 'Long' is not a delegate type.
is:
Vb.Net does not handle function pointers like VB6, probably it is like it's done in C# (since everything is just .Net). Delegate types are probably needed here.
Create a delegate type: "Delegate Sub MyDelSub()"
Then inside the function create an instance of this type : "Dim del As MyDelSub"
Now you can use the AddressOf function: "del = New MyDelSub(AddressOf YOURFUNCTIONNAME)"
Then to invoke, just use the Invoke function xD: "del.Invoke()"

Good luck!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)