Help!!
I am in the process of converting our software that was developed using VB6 to VB.Net. I have had some difficulties with some of the changes bu this has been the worste and I can't seem to get this working. I have found pieces of this all over the internet but every option I test, fails.
I have a VB.Net exe that reads the dll and class name from a table based on the tree node selected and loads the dll using CreateObject(). The dll contains forms and functions that I call based on the parameters that are passed and, upon exiting a function, passes a value back where I either do nothing or do something based on the returning value. This works great in VB6 and is the core of the applications' infastructure. Below is the code. Thanks in Advance.
VB6 exe Code:
PDLL = lrsLoad!DLL_ID & "." & lrsLoad!DLL_CLASS
Dim objPlugIn As Object
Dim strResponse As String
[Project Name].[Class Name]
Set objPlugIn = CreateObject(PDLL)
strResponse = objPlugIn.Edit(sIniFile, sDBPath, sDataSrc, sDataBase, sDBConnType, usus, pwpw, PDPD, ID, APPTYPE, "EDIT", V1, V2)
If strResponse = "1" And APPTYPE = "M" Then
frmMain.lsvMain_Click
Exit Sub
ElseIf strResponse = "2" And APPTYPE "M" Then
Exit Sub
End If
DLL Code (Gathers info, Opens the frmConfig Dialog, the user performs a function and selects OK and the control goes back to the exe)
Public Function Edit(sINIFile As String, sDBPath As String, sDataSrc As String, sDataBase As String, sDBConnType As String, usus As String, pwpw As String, pdpd As String, ID As String, AppType As String, APPEVENT As String, V1 As String, V2 As String
frmConfig.txtCD = V1
frmConfig.dtpRecDT = lrsLoad!CTRK_REC_DT
frmConfig.dtpEstStartDt = lrsLoad!CTRK_EST_START_DT
frmConfig.dtpStartDt = lrsLoad!CTRK_START_DT
frmConfig.dtpEstEndDt = lrsLoad!CTRK_EST_COMP_DT
frmConfig.dtpEndDt = lrsLoad!CTRK_COMP_DT
frmConfig.dtpRevDt = lrsLoad!CTRK_REV_DT
frmConfig.Caption = "Configuration Tracking - " & lrsLoad!CTRK_TRACK_ID
Screen.MousePointer = vbDefault
frmConfig.Show vbModal
Edit = ADODataInfo.txtDllResp
Exit Function