Solved

Drag and drop image from windows explorer to ActiveX control

Posted on 2004-08-06
10
286 Views
Last Modified: 2013-12-25
I have built a HTML editor which I am trying to add some functionality to. I am trying to emulate the functionality of an activeX control I have found called ActiveSquare by Namo. This control is a WYSIWYG HTML editor which allows you to drop a image from windows explorer onto the control to insert the image into you document. Does anyone know how this may be accomplished?

I was able to get the name of the file using the OLEDragDrop method of a textBox but I would like to be able to drag onto a WebBrowser control which does not support the OLDDragDrop method. The following VB code shows how to get the file name of a file dropped on a textBox named text1

Private Sub text1_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
   Text1.Text = Data.Files(1)
End Sub

My main problem is that the Microsoft Internet Controls component does not support the OLEDragDrop method. If it did I could upload the specified file to my site and create an <IMG> tag in my document to display the image. How does ActiveSquare accomplish this? This is a link to the demo on Namo's web site http://www.namo.com/products/activesquare/tryit/bbs/board.php?mode=writeform&offset=0
0
Comment
Question by:jay252
[X]
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
  • 3
  • 3
10 Comments
 
LVL 22

Expert Comment

by:DarkoLord
ID: 11740168
Why dont you use something like RichTextBox for HTML editing and then use WebBrowser control for (pre)viewing?

Darko
0
 
LVL 22

Expert Comment

by:DarkoLord
ID: 11745812
Hi again,
I think I found the right one on the Brad Martinez's site:

http://www.mvps.org/btmtz/treeview/tvdragdrop.zip

Darko
0
 
LVL 22

Expert Comment

by:DarkoLord
ID: 11745813
Oooops sorry ignore that post above I clicked the wrong thread

Darko
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:ashunigam
ID: 11782393
Can use OLECompleteDrag event and SendMessage API to perform what you want.
0
 
LVL 3

Expert Comment

by:ashunigam
ID: 11782409
Can use OLECompleteDrag event and SendMessage API to perform what you want.
0
 
LVL 3

Expert Comment

by:ashunigam
ID: 11782443
Clipboard.Clear
 Clipboard.SetData Picture1.Picture
Write code to capture handle of Activated application and save in tHWND
SendMessage tHwnd, WM_PASTE, 0, 0
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12942301
PAQed with no points refunded (of 500)

modulo
Community Support Moderator
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Adding to a VBA? 6 92
Crystal reports - Formula Field code need assistance with code 17 101
VB6 - Convert HH:MM into Decimal 8 76
can this macro be converted to sub procedure 4 34
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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 …
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

738 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