Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

Posted

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

Posted

: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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...