Drag and Drop

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • pmclinn

    #1

    Drag and Drop

    What is the argument structure for allowing a .exe file to except a
    drop file.

    Example.

    I take a picture (jpg) and drag it over a exe. The exe launches and
    then shows the picture.

    -Peter

  • Crouchie1998

    #2
    Re: Drag and Drop

    Hi Peter

    Look up command line arguments

    Public Sub Main(args() As String)

    If args.Length <> 1 Then

    ' Just load the application normally

    Else

    ' Do what you want with the file
    ' Example: Start program
    ' PictureBox1.Ima ge...

    End If

    End Sub

    The above is just an example for you to get the idea.

    You will need to change your application to start up from Sub Main too

    I hope this helps

    Crouchie1998
    BA (HONS) MCP MCSE


    Comment

    • Ken Tucker [MVP]

      #3
      Re: Drag and Drop

      Hi,

      The file name will be passed in as a command line argument

      http://msdn.microsoft.com/library/de...eargstopic.asp

      Ken
      ---------------
      "pmclinn" <pmclinn@gmail. com> wrote in message
      news:1117074930 .925839.23690@f 14g2000cwb.goog legroups.com...
      What is the argument structure for allowing a .exe file to except a
      drop file.

      Example.

      I take a picture (jpg) and drag it over a exe. The exe launches and
      then shows the picture.

      -Peter


      Comment

      Working...