Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > Pro VB.NET 2002/2003
|
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 8th, 2004, 03:42 PM
Registered User
 
Join Date: Oct 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default late binding, how to I create an event handler?

Hello,

With late binding, how to I create an event handler? Note this is all VB.NET, even the assembly.class that I'm trying to late bind.

Code example:

Dim objDll As [Assembly]

objDll = [Assembly].LoadFrom("D:\My Documents\myassembly.dll")

Dim myType As Type = objDll.GetType("myassembly.myclass")

Dim obj As Object
obj = Activator.CreateInstance(mytype)

'now how do I achieve the following?
'myclass has an event called 'Helloworld'

' this does not work as obj has no
' event named helloworld???
addhandler obj.Helloworld, addressof me.myclassHelloworld

sub myclasshelloworld()
'code...
end sub





Thanks,

Glenn Romaniuk







Similar Threads
Thread Thread Starter Forum Replies Last Post
late binding,help? alexcym Visual Basic 2005 Basics 2 April 7th, 2008 03:26 PM
late binding, how to I create an event handler? grom VB How-To 3 November 16th, 2004 02:33 AM
User controls and event handler binding perropicante ASP.NET 1.0 and 1.1 Professional 1 December 18th, 2003 10:52 AM
Late Binding Blade XML 3 July 17th, 2003 06:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.