cast a MSCOMCTL TreeView to a Windows Form TreeView
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: cast a MSCOMCTL TreeView to a Windows Form TreeView

  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 / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,480

    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
    Chicago, IL
    Posts
    15,002

    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
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center