I have created the following code using a ms sample
Imports System.Reflection
Public Class Form1
Inherits System.Windows.Forms.Form
+windows form designer generated code
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Try
Dim sLocation As String
sLocation =
" http://www.*-*-*.com/ ;
Dim FormAsm As [Assembly] = [Assembly].LoadFrom(sLocation)
Dim Formtype As Type = FormAsm.GetType("novatest.form1")
Dim Formobj As Object
Formobj = Activator.CreateInstance(Formtype) <--------(crash
here)
Dim Form1 As Form = CType(Formobj, Form)
Form1.Show()
Catch exc As Exception
MsgBox("Error Message to follow")
MsgBox(exc.ToString)
End Try
End Sub
End Class
The code crash's as marked, I do not understand what I am doing wrong ?
Any help would be appreciated.
The dll it is trying to load establishes a connection to access and process
2 fields, nothing serious.
kind Regards