Drag and drop a html file on the app I created 
Author Message
 Drag and drop a html file on the app I created

Hi everyone,

    I created a vb program with a webbrowser control but I don't know how
can I make my program launch when dragging an html file onto it and make
this file open in the webbrowser control in the same time.

    Thank for any reply.



Sun, 24 Feb 2002 03:00:00 GMT  
 Drag and drop a html file on the app I created
I haven't tried it, but have you looked at the docs for this?

object.RegisterAsDropTarget [= value]
Description

object
Required.
An object expression that evaluates to an object in the Applies To list.

value
Optional.
A Boolean expression that determines whether Internet Explorer is registered as a drop target for navigation. If TRUE, the WebBrowser is registered as a drop target; if FALSE, it is not a drop target. The default value is FALSE.

--
mvp Mark L. Ferguson Please reply in newsgroup
marfers notes for OE 5 > (16K) http://www.geocities.com/SiliconValley/Bay/6386/IE_ng_notes.htm

Quote:

> Hi everyone,

>     I created a vb program with a webbrowser control but I don't know how
> can I make my program launch when dragging an html file onto it and make
> this file open in the webbrowser control in the same time.

>     Thank for any reply.



Sun, 24 Feb 2002 03:00:00 GMT  
 Drag and drop a html file on the app I created
This property was already set for my wb control and it's used for drag and
drop onto the wb control itself and not on the icon of the program. My
question was not clear. Any idea?



I haven't tried it, but have you looked at the docs for this?

object.RegisterAsDropTarget [= value]
Description

object
Required.
An object expression that evaluates to an object in the Applies To list.

value
Optional.
A Boolean expression that determines whether Internet Explorer is registered
as a drop target for navigation. If TRUE, the WebBrowser is registered as a
drop target; if FALSE, it is not a drop target. The default value is FALSE.

--
mvp Mark L. Ferguson Please reply in newsgroup
marfers notes for OE 5 > (16K)
http://www.geocities.com/SiliconValley/Bay/6386/IE_ng_notes.htm


Quote:
> Hi everyone,

>     I created a vb program with a webbrowser control but I don't know how
> can I make my program launch when dragging an html file onto it and make
> this file open in the webbrowser control in the same time.

>     Thank for any reply.



Sun, 24 Feb 2002 03:00:00 GMT  
 Drag and drop a html file on the app I created
You can include the code for drop (and command line argument) in your VB app. Certainly access to the argument array of the main procedure is simple enough.

--
mvp Mark L. Ferguson Please reply in newsgroup
marfers notes for OE 5 > (16K) http://www.geocities.com/SiliconValley/Bay/6386/IE_ng_notes.htm

Quote:

> This property was already set for my wb control and it's used for drag and
> drop onto the wb control itself and not on the icon of the program. My
> question was not clear. Any idea?



> I haven't tried it, but have you looked at the docs for this?

> object.RegisterAsDropTarget [= value]
> Description

> object
> Required.
> An object expression that evaluates to an object in the Applies To list.

> value
> Optional.
> A Boolean expression that determines whether Internet Explorer is registered
> as a drop target for navigation. If TRUE, the WebBrowser is registered as a
> drop target; if FALSE, it is not a drop target. The default value is FALSE.

> --
> mvp Mark L. Ferguson Please reply in newsgroup
> marfers notes for OE 5 > (16K)
> http://www.geocities.com/SiliconValley/Bay/6386/IE_ng_notes.htm



> > Hi everyone,

> >     I created a vb program with a webbrowser control but I don't know how
> > can I make my program launch when dragging an html file onto it and make
> > this file open in the webbrowser control in the same time.

> >     Thank for any reply.



Sun, 24 Feb 2002 03:00:00 GMT  
 Drag and drop a html file on the app I created
Thank you for your reply.

Since I'm quite new to VB and programming in general (I started learning
just to be able to make my browser !), can you detail what you wrote please?



You can include the code for drop (and command line argument) in your VB
app. Certainly access to the argument array of the main procedure is simple
enough.

--
mvp Mark L. Ferguson Please reply in newsgroup
marfers notes for OE 5 > (16K)
http://www.geocities.com/SiliconValley/Bay/6386/IE_ng_notes.htm


Quote:
> This property was already set for my wb control and it's used for drag and
> drop onto the wb control itself and not on the icon of the program. My
> question was not clear. Any idea?



> I haven't tried it, but have you looked at the docs for this?

> object.RegisterAsDropTarget [= value]
> Description

> object
> Required.
> An object expression that evaluates to an object in the Applies To list.

> value
> Optional.
> A Boolean expression that determines whether Internet Explorer is
registered
> as a drop target for navigation. If TRUE, the WebBrowser is registered as
a
> drop target; if FALSE, it is not a drop target. The default value is
FALSE.

> --
> mvp Mark L. Ferguson Please reply in newsgroup
> marfers notes for OE 5 > (16K)
> http://www.geocities.com/SiliconValley/Bay/6386/IE_ng_notes.htm



> > Hi everyone,

> >     I created a vb program with a webbrowser control but I don't know
how
> > can I make my program launch when dragging an html file onto it and make
> > this file open in the webbrowser control in the same time.

> >     Thank for any reply.



Mon, 25 Feb 2002 03:00:00 GMT  
 Drag and drop a html file on the app I created
I don't mind, but a lesson in windows programming is a pretty ambitious undertaking for an NG post , g>.

You want to drop a file on an EXE created in VB.

A drop is like the first parameter of that exe run on the command line

c:\> c:\myapp.exe c:\mytext.txt

The same thing would be accomplished by dropping myfile.txt on myapp.exe

The Main procedure of the app you created has the tools in the VB library to 'parse' the command line for the argument (argument = Argv[0] , namely  'c:\mytext.txt' )

--
mvp Mark L. Ferguson Please reply in newsgroup
marfers notes for OE 5 > (16K) http://www.geocities.com/SiliconValley/Bay/6386/IE_ng_notes.htm

Quote:

> Thank you for your reply.

> Since I'm quite new to VB and programming in general (I started learning
> just to be able to make my browser !), can you detail what you wrote please?



> You can include the code for drop (and command line argument) in your VB
> app. Certainly access to the argument array of the main procedure is simple
> enough.

> --
> mvp Mark L. Ferguson Please reply in newsgroup
> marfers notes for OE 5 > (16K)
> http://www.geocities.com/SiliconValley/Bay/6386/IE_ng_notes.htm



> > This property was already set for my wb control and it's used for drag and
> > drop onto the wb control itself and not on the icon of the program. My
> > question was not clear. Any idea?



> > I haven't tried it, but have you looked at the docs for this?

> > object.RegisterAsDropTarget [= value]
> > Description

> > object
> > Required.
> > An object expression that evaluates to an object in the Applies To list.

> > value
> > Optional.
> > A Boolean expression that determines whether Internet Explorer is
> registered
> > as a drop target for navigation. If TRUE, the WebBrowser is registered as
> a
> > drop target; if FALSE, it is not a drop target. The default value is
> FALSE.

> > --
> > mvp Mark L. Ferguson Please reply in newsgroup
> > marfers notes for OE 5 > (16K)
> > http://www.geocities.com/SiliconValley/Bay/6386/IE_ng_notes.htm



> > > Hi everyone,

> > >     I created a vb program with a webbrowser control but I don't know
> how
> > > can I make my program launch when dragging an html file onto it and make
> > > this file open in the webbrowser control in the same time.

> > >     Thank for any reply.



Mon, 25 Feb 2002 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Creating Drag and Drop App in VB

2. When an item from File Explorer is dragged/dropped on my app

3. Problem in OLE DRAG AND DROP FROM VB SOURCE APP TO VC++ TARGET APP

4. Drag drop from VB4 app to VB3 app ?

5. How to insert with drag drop a control I designed in a html page

6. Creating HTML Help Files for VB apps with Context information

7. Drag and Drop from Web app to Contacts

8. Drag and drop an email attachment on an VB app

9. drag and drop from vb 5 app to the desktop (active and normal)

10. Drag and Drop in Explorer-Type App??

11. Drag&Drop: VB to other apps ?

12. Drag and Drop between 2 VB apps: How??

 

 
Powered by phpBB® Forum Software