Drop file on HTMLViewer

Is there anyway yo Drop a file (PDF or Image) into an HTMLViewer ?

I can do it with a canvas but not in an HTMLViewer

What do you wish to happen when you do that?

I want to drop a pdf file, gets its path and show it in the HTMLViewer

Hmmm, I guess there aren’t any events to do that in the HTMLViewer itself. Might be possible in javascript.

do you know how ?

Not without looking.

Couldn’t you add in the DropObject event handler for the window then load that file to the HTMLViewer control with its LoadPage method?

I put a canvas on the HTMLViewer and put my code on the canvas event handler. Is it a good solution ? It works (apparently)

We have a winner here:
In Window1.Open:

Me.AcceptFileDrop FTG.All // Define it

In Window1.DropObject

HTMLViewr&.LoadURL Obj.FolderItem.URLPath

Works fine with images and pdf (FTG.All defines both)