************************************************************************ * Create the Objects that listen for messages ************************************************************************ ovfpcomm = CREATEOBJECT('vfpCom.comutil') vfpsockevent = NEWOBJECT("_IConnectionFactoryEvents") sockfactory = CREATEOBJECT("S2TCPComms.TCPConnectionFactory.1") ... ************************************************************************** * Here is the message class factory code that is bound to events ************************************************************************** DEFINE CLASS _IConnectionFactoryEvents AS CUSTOM * PROCEDURE NewConnection LPARAMETERS CONNECTION WAIT WINDOW NOWAIT 'New Connection' msgwindow.edit1.VALUE = 'Started' msgwindow.frmMsgCnt = 0 msgwindow.frmStatus = 'Listening' IF glSaveCon INSERT INTO plog (transdt,logdesc,messagetxt) VALUES (DATETIME(),'Connection','Connect Created') ENDIF msgwindow.REFRESH() ENDPROC PROCEDURE NewMessage LPARAMETERS CONNECTION ... code here to parse message endprocI'm trying to convert this to VB.NET, in the form, I have the following right after the Inherits System.windows.forms.form statement: