Copying file to Clipboard

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

    Copying file to Clipboard

    I am trying to copy a file onto the clipboard but I am not having any
    success. Perhaps someone can help me out.
    I have the full file name from my application and to put it onto the
    clipboard I have tried:

    Clipboard.SetDa taObject(New DataObject(Data Formats.FileDro p, myFileName),
    True)

    where myFileName is a string and contains the full path name of the file.
    When I retrieve a 'FileDrop' type data from the clipboard the object is an
    array so I also tried:

    Dim myFileData as String() = {myFileName}
    Clipboard.SetDa taObject(New DataObject(Data Formats.FileDro p, myFileData),
    True)

    but niether of these work. Can some please tell hoe I should do it.

    Thanks
    Fred


  • Joe LeVasseur

    #2
    Re: Copying file to Clipboard

    Hi-
    Google is your friend. :-)

    (Watch for line wrap.)
    Joe
    --
    *************** *************** *************** **************
    Joe LeVasseur JoeJunk@MVPs.or g
    "To none will we sell, to none deny or delay,
    right or justice." Magna Carta (June 15, 1215)
    *************** *************** *************** *************
    PS- Please reply to the newsgroup- except in the
    case of flames, insults, etc. (Don't bother.)


    "fred" <Sorry@NoSpam.c om> wrote in message
    news:OLIAB7jGEH A.3764@TK2MSFTN GP12.phx.gbl...[color=blue]
    > I am trying to copy a file onto the clipboard but I am not having any
    > success. Perhaps someone can help me out.
    > I have the full file name from my application and to put it onto the
    > clipboard I have tried:
    >
    > Clipboard.SetDa taObject(New DataObject(Data Formats.FileDro p, myFileName),
    > True)
    >
    > where myFileName is a string and contains the full path name of the file.
    > When I retrieve a 'FileDrop' type data from the clipboard the object is an
    > array so I also tried:
    >
    > Dim myFileData as String() = {myFileName}
    > Clipboard.SetDa taObject(New DataObject(Data Formats.FileDro p, myFileData),
    > True)
    >
    > but niether of these work. Can some please tell hoe I should do it.
    >
    > Thanks
    > Fred
    >
    >[/color]


    Comment

    • Joe LeVasseur

      #3
      Re: Copying file to Clipboard

      Hi-
      Google is your friend. :-)

      (Watch for line wrap.)
      Joe
      --
      *************** *************** *************** **************
      Joe LeVasseur JoeJunk@MVPs.or g
      "To none will we sell, to none deny or delay,
      right or justice." Magna Carta (June 15, 1215)
      *************** *************** *************** *************
      PS- Please reply to the newsgroup- except in the
      case of flames, insults, etc. (Don't bother.)


      "fred" <Sorry@NoSpam.c om> wrote in message
      news:OLIAB7jGEH A.3764@TK2MSFTN GP12.phx.gbl...[color=blue]
      > I am trying to copy a file onto the clipboard but I am not having any
      > success. Perhaps someone can help me out.
      > I have the full file name from my application and to put it onto the
      > clipboard I have tried:
      >
      > Clipboard.SetDa taObject(New DataObject(Data Formats.FileDro p, myFileName),
      > True)
      >
      > where myFileName is a string and contains the full path name of the file.
      > When I retrieve a 'FileDrop' type data from the clipboard the object is an
      > array so I also tried:
      >
      > Dim myFileData as String() = {myFileName}
      > Clipboard.SetDa taObject(New DataObject(Data Formats.FileDro p, myFileData),
      > True)
      >
      > but niether of these work. Can some please tell hoe I should do it.
      >
      > Thanks
      > Fred
      >
      >[/color]


      Comment

      • fred

        #4
        Re: Copying file to Clipboard

        Thanks Joe

        "Joe LeVasseur" <JoeJunk@MVPs.O rg> wrote in message
        news:OOASmnlGEH A.2436@TK2MSFTN GP09.phx.gbl...[color=blue]
        > Hi-
        > Google is your friend. :-)
        > http://groups.google.com/groups?thre...%40tkmsftngp12
        > (Watch for line wrap.)
        > Joe
        > --
        > *************** *************** *************** **************
        > Joe LeVasseur JoeJunk@MVPs.or g
        > "To none will we sell, to none deny or delay,
        > right or justice." Magna Carta (June 15, 1215)
        > *************** *************** *************** *************
        > PS- Please reply to the newsgroup- except in the
        > case of flames, insults, etc. (Don't bother.)
        >
        >
        > "fred" <Sorry@NoSpam.c om> wrote in message
        > news:OLIAB7jGEH A.3764@TK2MSFTN GP12.phx.gbl...[color=green]
        > > I am trying to copy a file onto the clipboard but I am not having any
        > > success. Perhaps someone can help me out.
        > > I have the full file name from my application and to put it onto the
        > > clipboard I have tried:
        > >
        > > Clipboard.SetDa taObject(New DataObject(Data Formats.FileDro p,[/color][/color]
        myFileName),[color=blue][color=green]
        > > True)
        > >
        > > where myFileName is a string and contains the full path name of the[/color][/color]
        file.[color=blue][color=green]
        > > When I retrieve a 'FileDrop' type data from the clipboard the object is[/color][/color]
        an[color=blue][color=green]
        > > array so I also tried:
        > >
        > > Dim myFileData as String() = {myFileName}
        > > Clipboard.SetDa taObject(New DataObject(Data Formats.FileDro p,[/color][/color]
        myFileData),[color=blue][color=green]
        > > True)
        > >
        > > but niether of these work. Can some please tell hoe I should do it.
        > >
        > > Thanks
        > > Fred
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • fred

          #5
          Re: Copying file to Clipboard

          Thanks Joe

          "Joe LeVasseur" <JoeJunk@MVPs.O rg> wrote in message
          news:OOASmnlGEH A.2436@TK2MSFTN GP09.phx.gbl...[color=blue]
          > Hi-
          > Google is your friend. :-)
          > http://groups.google.com/groups?thre...%40tkmsftngp12
          > (Watch for line wrap.)
          > Joe
          > --
          > *************** *************** *************** **************
          > Joe LeVasseur JoeJunk@MVPs.or g
          > "To none will we sell, to none deny or delay,
          > right or justice." Magna Carta (June 15, 1215)
          > *************** *************** *************** *************
          > PS- Please reply to the newsgroup- except in the
          > case of flames, insults, etc. (Don't bother.)
          >
          >
          > "fred" <Sorry@NoSpam.c om> wrote in message
          > news:OLIAB7jGEH A.3764@TK2MSFTN GP12.phx.gbl...[color=green]
          > > I am trying to copy a file onto the clipboard but I am not having any
          > > success. Perhaps someone can help me out.
          > > I have the full file name from my application and to put it onto the
          > > clipboard I have tried:
          > >
          > > Clipboard.SetDa taObject(New DataObject(Data Formats.FileDro p,[/color][/color]
          myFileName),[color=blue][color=green]
          > > True)
          > >
          > > where myFileName is a string and contains the full path name of the[/color][/color]
          file.[color=blue][color=green]
          > > When I retrieve a 'FileDrop' type data from the clipboard the object is[/color][/color]
          an[color=blue][color=green]
          > > array so I also tried:
          > >
          > > Dim myFileData as String() = {myFileName}
          > > Clipboard.SetDa taObject(New DataObject(Data Formats.FileDro p,[/color][/color]
          myFileData),[color=blue][color=green]
          > > True)
          > >
          > > but niether of these work. Can some please tell hoe I should do it.
          > >
          > > Thanks
          > > Fred
          > >
          > >[/color]
          >
          >[/color]


          Comment

          Working...