Late Binding VB7 
Author Message
 Late Binding VB7

Hi All.

Just wondering is it possible to use Late Binding with New

O=New "ClassName".

I Guess NOT so you have to use:

VB6.CreateObject("ClassName")

Is this way to go when u want to use late binding?



Sat, 31 May 2003 21:25:07 GMT  
 Late Binding VB7
Erkel,

<<
Just wondering is it possible to use Late Binding with New

O=New "ClassName".

I Guess NOT so you have to use:

VB6.CreateObject("ClassName")

Is this way to go when u want to use late binding?

Late binding has nothing to do with how a class is instantiated.

e.g.

  Dim O As Object = New Foo

generates a late-bound reference to an instance of Foo via the variable O.
It is the variable that determines early vs. late binding, not the
instantiation method.

e.g.

  Dim O As Foo = CType(CreateObject("MyFoo", ""), Foo)

generates an early bound reference (via O) to an object whose ProgID is
"MyFoo".

Malcolm Stewart
Microsoft Beta Technical Support



Sat, 31 May 2003 23:57:23 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. early binding vs late binding

2. Activex Server - Early Binding vs. Late Binding

3. Late Binding vs Early Binding in out-of-process servers

4. * Early binding or late binding

5. Early binding and Late binding

6. early binding / late binding

7. Early binding and Late binding in VB.

8. Early Binding and Late Binding

9. Early bind and Late bind in VB.

10. Early binding and Late binding in VB.

11. early binding vs late binding

12. Early Binding - Late Binding

 

 
Powered by phpBB® Forum Software