CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2011
    Posts
    3

    cast a MSCOMCTL TreeView to a Windows Form TreeView

    Hi all.

    I'm coding a project in visuel C#, and in VBA.

    The connection between the two is made with a COM object.

    I have created a TreeView in VBA with the librairie MSCOMCTL. And i want to send this TreeView Object to C#

    The thing is that C# windows Forms TreeView seems to be not compatible with VBA MSCOMCTL treeView.

    Is there any tips or idea to fix this ?

    any help is welcome !

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: cast a MSCOMCTL TreeView to a Windows Form TreeView

    Both controls have completely different implementations, so they are not at all compatible.

  3. #3
    Join Date
    Aug 2011
    Posts
    3

    Re: cast a MSCOMCTL TreeView to a Windows Form TreeView

    Yes, you're right !
    But i want to manipulate a MSCOMCTL TreeView created in VBA Excel in a C# application.
    I already receive that TreeView in my C# application in Visual Studio.

    I tried to handle this treeview with MSCOMCTL too in C#. But the treeview method causes me many problems ...

    For exemple, i can't even use the : myTreeView.Nodes.Add method.

    Is there any tips or solution, or exemple ?
    any help would be fine ...

    thank you again !

  4. #4
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: cast a MSCOMCTL TreeView to a Windows Form TreeView

    MSDN has 101 Samples. Choose the right version: http://www.microsoft.com/download/en...ang=en&id=4856
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  5. #5
    Join Date
    Aug 2011
    Posts
    3

    Re: cast a MSCOMCTL TreeView to a Windows Form TreeView

    there is no solution to my problem in your link ...
    Any other help please ?

    If you need i can be more specific ... thank you

Tags for this Thread

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

Featured