dcsimg
Results 1 to 6 of 6

Thread: OLEDragDrop

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2014
    Posts
    310

    OLEDragDrop

    VB6 application uses OLEDragDrop of the ListBox to bring some files into the list.
    Procedure is working fine on Windows 7 development machine, on W7 and W10 of the user workstations.
    The same event doesn't fire on 2 Windows 10 development machines.
    User Account Control Settings are off.
    DragDrop outside of the VB project works fine.
    Sorry if I'm asking in the wrong forum, maybe I need to search some Windows settings forums, but I'm afraid that there may be opposite situation - member of those forumes will not be familiar with VB.
    I think that it is either some settings of Visual Studio 6, or Windows 10, because the copy of the project moved to W7 was running fine.
    What should I check to make it work?

    Thank you

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2014
    Posts
    310

    Re: OLEDragDrop

    I made one more test - I ran compiled version of the project on the W10 development machine. OLEDragDrop works.
    So, I think that some VB6 (VS6) settings do not allow OLEDragDrop to work.

    Thank you

  3. #3
    Frenzied Member some1uk03's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    1,504

    Re: OLEDragDrop

    If you're not running as Admin, it won't allow drag & drop events to fire.
    _____________________________________________________________________

    ----If this post has helped you. Please take time to Rate it.
    ----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.



  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2014
    Posts
    310

    Re: OLEDragDrop

    Usually I open the project by double clicking on the MyProject.vbp. Trying to follow your advice I right-clicked vbp, did not see there Run as Administrator, then open VB6.exe location, right-click. Blank new project was opened, I open my project via File menu. Unfortunately this way of opening doesn't fix the problem.

    Anyway thank you.

  5. #5
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    18,572

    Re: OLEDragDrop

    On more modern O/S, you can only drag & drop from a higher/equal user rights to a lower/equal user rights. You cannot drag/drop from lower to higher. Is that your scenario?

    I run VB IDE elevated. So to test drag/drop in the IDE (development), I will open NotePad elevated and then select File|Open menu items to display a browser. From that browser (now in an elevated process), I can navigate to desired folder, drag files from it to VB IDE.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2014
    Posts
    310

    Re: OLEDragDrop

    Thank you very much. I tested your way and it worked.
    Now I need to look for the way to open Explorer to simulate your way.
    Currently I'm using this code:
    Code:
    Private Sub cmdDragDropAttachment_Click()
    Const quote As String = """"
    Dim path As String
    
    Dim strFolderPath As String
        If blnDataLocation = True Then
            strFolderPath = App.path & "\Data\JobDocuments\" & strJobNumber & "\BinderDocs"
        Else
            strFolderPath = strMappedDrive & "\" & strCoordinatorFolder & "\Data\JobDocuments\" & strJobNumber & "\BinderDocs"
        End If
        'Create the tree of folders if it doesn't exist
        CreateDirectoryTree strFolderPath
    'Create all Subfolders passed as parameters in Recordset
    
        path = Replace(strFolderPath, quote, quote & quote)
        Shell "explorer.exe /e, " & path, vbNormalFocus
    
        Exit Sub
    ErrorHandler:
        MousePointer = vbDefault
        MsgBox "Error " & Err.Number & ", '" & Err.Description & "' in cmdDragDropAttachment_Click. Report to your Administrator.", vbCritical + vbOKOnly, "Error"
    
    End Sub
    Thanks a lot

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width