Illusion Posted April 4, 2005 Posted April 4, 2005 Hi, I am having a problem with converting some c# code to vb.net. I have this code FServer.OnConnect += new TIdServerThreadEvent(TCPServerConnect); FServer.OnExecute += new TIdServerThreadEvent(TCPServerExecute); FServer.DefaultPort = 6000; FServer.Active = true; I can convert all the other code, but I dont know how to handle delegates so I cant get it to work. I tried putting RaiseEvent at the start of the code, but didn't work... Any Ideas Thanks Dan. Quote
Jaco Posted April 4, 2005 Posted April 4, 2005 From "Instant VB" I get: Sub Test() AddHandler FServer.OnConnect, AddressOf TCPServerConnect AddHandler FServer.OnExecute, AddressOf TCPServerExecute FServer.DefaultPort = 6000 FServer.Active = True End Sub Quote
Illusion Posted April 4, 2005 Author Posted April 4, 2005 :o It worked!!!!! thank you so much.. i spent the weekend looking for a solution, even posted on the main newsgroup board!! .. :D Thanks again Dan. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.