[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


How to Ole Drag/Drop image files to a 3rd party program?

Posted on 2002-06-20
Medium Priority
Last Modified: 2010-05-02
On a VB6 form I have a File1 control listing multiple .JPG files.  In File2 on the same form I have a 3rd party image printing program that will accept OleDragDrop (I've tested it with Explorer, dropping up to five images on it).

I would like to multiselect files from File1 then drag them to the .EXE shown in File2 and drop them, which should have the same effect as working within Explorer, launching the program with the files loaded inside.

It seemed simple until I began and now I need lots of help.


The process I need to do is to drag and drop multiple files onto a 3rd party program so that the 3rd party program accepts the files and launches.

This would be similar to having two instances of Explorer open, one pointing to a folder with .JPG files in it and the other instance pointing to a 3rd party .JPG printing program.  Another example would be one Explorer showing .BMP's and the other Explorer showing MS Paint.  Click and drag the .BMP and drop it on the MS Paint program and it will not only launch MS Paint but MS Paint will have the .BMP displayed when it is opened.

I am attempting to do this with a more friendly interface than two instances of Explorer, using the VB Controls File1 and File2.

Is it possible to have two instances of Explorer (like a control) within my VB6 project so that the drag and drop onto them and thereby the 3rd party program would be automatic?

Can anybody help?
Question by:rrorison
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 16

Expert Comment

ID: 7097780
i have something...let me see...

Expert Comment

ID: 7098706
Take a look here.
This might help you code for your requirement.
LVL 16

Expert Comment

ID: 7098872
try this (it was done with a picture box so you have to do some changes):

Begin VB.Form Form1
   Caption         =   "Form1"
   ClientHeight    =   3600
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6180
   LinkTopic       =   "Form1"
   ScaleHeight     =   3600
   ScaleWidth      =   6180
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command1
      Caption         =   "&Select folder"
      Height          =   435
      Left            =   4380
      TabIndex        =   2
      Top             =   3060
      Width           =   1635
   Begin VB.FileListBox File1
      Height          =   2820
      Left            =   60
      Pattern         =   "*.jpg"
      TabIndex        =   1
      Top             =   120
      Width           =   2475
   Begin VB.PictureBox Picture1
      AutoSize        =   -1  'True
      Height          =   2775
      Left            =   2700
      ScaleHeight     =   2715
      ScaleWidth      =   3315
      TabIndex        =   0
      Top             =   120
      Width           =   3375
   Begin VB.Label Label1
      AutoSize        =   -1  'True
      Height          =   195
      Left            =   2160
      TabIndex        =   3
      Top             =   3600
      Width           =   480
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()

With File1
    .Path = BrowseForFolder(Me.hWnd, "")
    .Pattern = "*.jpg;*.gif"
End With
End Sub

Private Sub File1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
With Label1
    .Caption = File1.Path & "\" & File1.FileName
    .Drag vbBeginDrag
End With
End Sub

Private Sub Picture1_DragDrop(Source As Control, X As Single, Y As Single)
Picture1.Picture = LoadPicture(Label1.Caption)
End Sub
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Author Comment

ID: 7105348


To rpai:

While the link you provided did indeed have notations regarding drag and drop as a process on a VB project, the referenced link focused primarily on image to image controls.  My original question asked for help regarding multiple image files and ole drag and drop to a 3rd party software program.

To Richie_Simonetti:

As I noted above, my original question did not refer to ole drag and drop from the File1 control to an image control, but for multiple image files being dropped onto a software program, File1 to File2 and have that program launched.

At this time I am requesting to have this question removed so no further Comments or Suggestions should be registered.

My thanks to those who spent time to provide these suggestion.
LVL 16

Expert Comment

ID: 7105398
i didn't use OleDrag!
LVL 49

Expert Comment

ID: 7923703
Hi rrorison,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Refund points and save as a 0-pt PAQ.

rrorison, Please DO NOT accept this comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
DanRollins -- EE database cleanup volunteer

Accepted Solution

SpideyMod earned 0 total points
ID: 7968429
per recommendation

Community Support Moderator @Experts Exchange

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

656 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