Need help Implement a class interface. 
Author Message
 Need help Implement a class interface.

Consider the code in class module #1 call "Shell"

    Sub OnlyMethod()

    End Sub

    *****************************
Now consider the code in class module #2 call "ImpShell"

    Implements Shell

    Sub Shell_OnlyMethod()
        MsgBox "Calling the Shell_OnlyMethod"
    End Sub

    To run these simple classes we use codes like:

    Sub test()
        Dim Obj As New ImpShell
        Obj.Shell_OnlyMethod    ' will call up the message box.
    End Sub

***********************************
Now consider the code in class module #3 call "ImpImpShell"

    Implements ImpShell

    Sub ImpShell_Shell_OnlyMethod()
        MsgBox "Calling the ImpShell_Shell_OnlyMethod"         ' will give a
error !
    End Sub

    To run the same code we used before will give an error:

    Sub test()
        Dim Obj As New ImpImpShell
        Obj.ImpShell_Shell_OnlyMethod                 '  ERROR
    End Sub

So is this mean the class interface can only be implemented once?

Thank you.



Sun, 09 Oct 2005 08:25:21 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Implementing IUnknown interface in Access 2000 class

2. Implementing the IEnumerator interface in my custom class

3. Which classes implement an interface?

4. Identifying classes/components that implements certain interfaces

5. Implementing public interface of another class

6. IMPLEMENTING AN INTERFACE MADE FROM ANOTHER INTERFACE

7. Implementing an interface made from another interface

8. IMPLEMENTING AN INTERFACE MADE FROM ANOTHER INTERFACE

9. Implementing an interface made from another interface

10. Using Forms in Classes (beginner w/ classes needs help)

11. How can I check if a late-bound class implements an Interface or inherits a defined class

12. Implementing interfaces

 

 
Powered by phpBB® Forum Software