Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 306
  • Last Modified:

Drag and drop image from windows explorer to ActiveX control

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
jay252
Asked:
jay252
  • 3
  • 3
1 Solution
 
DarkoLordCommented:
Why dont you use something like RichTextBox for HTML editing and then use WebBrowser control for (pre)viewing?

Darko
0
 
DarkoLordCommented:
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
 
DarkoLordCommented:
Oooops sorry ignore that post above I clicked the wrong thread

Darko
0
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.

 
ashunigamCommented:
Can use OLECompleteDrag event and SendMessage API to perform what you want.
0
 
ashunigamCommented:
Can use OLECompleteDrag event and SendMessage API to perform what you want.
0
 
ashunigamCommented:
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
 
moduloCommented:
PAQed with no points refunded (of 500)

modulo
Community Support Moderator
0

Featured Post

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!

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now