Results 1 to 4 of 4

Thread: [RESOLVED] interface question

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2007
    Posts
    403

    Resolved [RESOLVED] interface question

    hi all,

    i created an Interface named IChildCommands.

    implemented this in my form.

    when executing procedures of this interface, i use

    Code:
    DirectCast(Me.ActiveMdiChild, IChildCommands).Something
    i'm trying to look for a way to pass DirectCast(Me.ActiveMdiChild, IChildCommands) to an object so that i wouldn't be typing it all each time i want to use it.

    i want to do something like

    Code:
    Dim mychild As New Object = DirectCast(Me.ActiveMdiChild, IChildCommands)
    but the above code is wrong and i only used object as an example. in reality, i have no clue what variable type to use for this.

    please help.

    thanks.
    Last edited by adshocker; Mar 30th, 2009 at 09:36 PM.

    VB Version: Microsoft Visual Studio 2008 Professional Edition
    .NET Version: Microsoft .NET Framework Version 3.5
    OS: Windows XP SP3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width