TreeView.DragIcon = ccNoDrop

Posted on 2008-11-10
Last Modified: 2013-12-26
Why can't I just set the icon to one of the standard pointers ?
I see alot of examples using:
TreeView.DragIcon = TreeView.SelectedItem.CreateDragImage

but I don't want to create an image.

Question by:sidwelle
    1 Comment

    Accepted Solution

    Found it !
    "Dragging the OLE Drag Source over the OLE Drop Target"

    Private Sub TreeView_OLEDragOver(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single, State As Integer)

    '    vbDropEffectNone 0 Drop target cannot accept the data.
    '    vbDropEffectCopy 1 Drop results in a copy. The original data is untouched by the drag source.
    '    vbDropEffectMove 2 Drag source removes the data.
        Effect = vbDropEffectNone
    End Sub

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
    Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now