S
Simon Verona
I would normally use code such as :
Dim Customer as new Customer
Dim t as new threading.thread(AddressOf Customer.DisplayCustomer)
Customer.CustomerId=MyCustomerId
t.start
Which would create a new thread to display a customer on the screen for example.
However, I have a problem with circular references in my objects which means that I have to load the customer object using reflection ie :
Dim Customer As Object
Dim dmsobj As New DmsObjects.Functions
Customer = dmsobj.LoadMeByName("DMSCustomer.dll", "DMSCustomer.Customer", Nothing) <--- this is a wrapper round some reflection code to load up the object
Customer.Customer = dms.data("ActivityLog", 5, RowNo)
customer.displaycustomer
This code works.
However, I want to do :
Dim Customer As Object
Dim dmsobj As New DmsObjects.Functions
Customer = dmsobj.LoadMeByName("DMSCustomer.dll", "DMSCustomer.Customer", Nothing)
Customer.Customer = dms.data("ActivityLog", 5, RowNo)
Dim t As New Threading.Thread(AddressOf Customer.DisplayCustomer)
t.Start()
This doesn't compile, due to latebinding, it complains that "Customer.DisplayCustomer" is not a valid method.
How can I acheive this??
Many thanks in advance.
Simon
Dim Customer as new Customer
Dim t as new threading.thread(AddressOf Customer.DisplayCustomer)
Customer.CustomerId=MyCustomerId
t.start
Which would create a new thread to display a customer on the screen for example.
However, I have a problem with circular references in my objects which means that I have to load the customer object using reflection ie :
Dim Customer As Object
Dim dmsobj As New DmsObjects.Functions
Customer = dmsobj.LoadMeByName("DMSCustomer.dll", "DMSCustomer.Customer", Nothing) <--- this is a wrapper round some reflection code to load up the object
Customer.Customer = dms.data("ActivityLog", 5, RowNo)
customer.displaycustomer
This code works.
However, I want to do :
Dim Customer As Object
Dim dmsobj As New DmsObjects.Functions
Customer = dmsobj.LoadMeByName("DMSCustomer.dll", "DMSCustomer.Customer", Nothing)
Customer.Customer = dms.data("ActivityLog", 5, RowNo)
Dim t As New Threading.Thread(AddressOf Customer.DisplayCustomer)
t.Start()
This doesn't compile, due to latebinding, it complains that "Customer.DisplayCustomer" is not a valid method.
How can I acheive this??
Many thanks in advance.
Simon