Using VB.Net or C#, utilizing the clipboard object, how to copy an MS Excel graphic from the clipboa

Discussion in 'ASP .Net' started by TC, Jul 27, 2004.

  1. TC

    TC Guest

    Hello,

    Here is what I'm trying to do:

    -- Make sure both MS Excel and MS Word are running
    -- Create an Excel chart
    -- Save the Excel file
    -- Copy the Excel chart onto the clipboard using Ctrl + C
    -- Go to Word and look under Edit > Paste Special
    -- Note there is a source reference and an option to paste the chart as a
    metafile, etc.
    -- I would like to take this same information and make it available in a C#
    or VB.Net app

    For example, create a simple Windows application with a userform, an image
    control, a label and a single command button.

    Let's say that after the Excel chart is on the clipboard, one clicks the
    Windows application command button and Voila!, the imate control now
    contains a copy of the Excel chart and the label contains the reference
    information.

    I can make this work utilizing older technologies (i.e. WIN API to access
    the clipboard, etc.).

    Currently, when I try to set the image control in C#, I get a "cannot
    implicitly convert ..." blah blah error. Don't even know where to begin to
    obtain the source reference.

    Either I do not understand the currently available clipboard functionality
    under .Net or this is still only possible via the WIN API.

    Any assistance would be appreciated.

    Best Regards,

    Todd
     
    TC, Jul 27, 2004
    #1
    1. Advertising

  2. TC

    Cor Ligthert Guest

    Cor Ligthert, Jul 27, 2004
    #2
    1. Advertising

  3. TC

    TC Guest

    Hey Cor & Other Folks,

    OK, let me clarify a bit here.

    Using the WIN32 API, there is a clipboard format called "OwnerLink".
    Similarly to the .Net clipboard, one would register this format, check for
    it on the clipboard and then retrieve using several API calls.

    There are also clipboard formats called "Link Descriptor" and "Object
    Descriptor" under WIN32.

    I guess it fair to say that, under .Net, there are currently no methods or
    properties available to extract a source reference when a user places an
    Office object / graphic on the clipboard.

    If there is a workaround, by all means, please share.

    Best Regards,

    Todd





    "Cor Ligthert" <> wrote in message
    news:eByIfJ%...
    > Hi TC,
    >
    > Keep in mind that it is not important for dotNet how it is set on the
    > clipboard the only thing that is important what object is on the

    clipboard.
    >
    > Here some links that should answer all your questions.
    >
    >

    http://msdn.microsoft.com/library/d.../vbcon/html/vbconDragDropClipboardSupport.asp
    >
    >

    http://msdn.microsoft.com/library/d.../en-us/dv_vstechart/html/vbtchimpdragdrop.asp
    >
    > I hope this helps a little bit?
    >
    > Cor
    >
    >
     
    TC, Jul 27, 2004
    #3
  4. Re: Using VB.Net or C#, utilizing the clipboard object, how to cop

    Hi Todd,

    A class named ClipBoard is present in the namespace System.Windows.Forms. This class has only 2 methods - to set and get the content to and from ClipBoard. The Get method returns an IDataObject interface that has methods to identify the format of the clip board content, but not the reference information you needed.

    Regards,--
    Girish Kumar
    ICICI Infotech


    "TC" wrote:

    > Hey Cor & Other Folks,
    >
    > OK, let me clarify a bit here.
    >
    > Using the WIN32 API, there is a clipboard format called "OwnerLink".
    > Similarly to the .Net clipboard, one would register this format, check for
    > it on the clipboard and then retrieve using several API calls.
    >
    > There are also clipboard formats called "Link Descriptor" and "Object
    > Descriptor" under WIN32.
    >
    > I guess it fair to say that, under .Net, there are currently no methods or
    > properties available to extract a source reference when a user places an
    > Office object / graphic on the clipboard.
    >
    > If there is a workaround, by all means, please share.
    >
    > Best Regards,
    >
    > Todd
    >
    >
    >
    >
    >
    > "Cor Ligthert" <> wrote in message
    > news:eByIfJ%...
    > > Hi TC,
    > >
    > > Keep in mind that it is not important for dotNet how it is set on the
    > > clipboard the only thing that is important what object is on the

    > clipboard.
    > >
    > > Here some links that should answer all your questions.
    > >
    > >

    > http://msdn.microsoft.com/library/d.../vbcon/html/vbconDragDropClipboardSupport.asp
    > >
    > >

    > http://msdn.microsoft.com/library/d.../en-us/dv_vstechart/html/vbtchimpdragdrop.asp
    > >
    > > I hope this helps a little bit?
    > >
    > > Cor
    > >
    > >

    >
    >
    >
     
    =?Utf-8?B?R2lyaXNoS3VtYXI=?=, Jul 29, 2004
    #4
  5. TC

    TC Guest

    Re: Using VB.Net or C#, utilizing the clipboard object, how to cop

    Hey Girish,

    Sorry for the delayed response.

    I just wanted to thank you for the first very clear and direct answer to
    this question.

    Best Regards,

    Todd

    "GirishKumar" <> wrote in message
    news:...
    > Hi Todd,
    >
    > A class named ClipBoard is present in the namespace System.Windows.Forms.

    This class has only 2 methods - to set and get the content to and from
    ClipBoard. The Get method returns an IDataObject interface that has methods
    to identify the format of the clip board content, but not the reference
    information you needed.
    >
    > Regards,--
    > Girish Kumar
    > ICICI Infotech
    >
    >
    > "TC" wrote:
    >
    > > Hey Cor & Other Folks,
    > >
    > > OK, let me clarify a bit here.
    > >
    > > Using the WIN32 API, there is a clipboard format called "OwnerLink".
    > > Similarly to the .Net clipboard, one would register this format, check

    for
    > > it on the clipboard and then retrieve using several API calls.
    > >
    > > There are also clipboard formats called "Link Descriptor" and "Object
    > > Descriptor" under WIN32.
    > >
    > > I guess it fair to say that, under .Net, there are currently no methods

    or
    > > properties available to extract a source reference when a user places an
    > > Office object / graphic on the clipboard.
    > >
    > > If there is a workaround, by all means, please share.
    > >
    > > Best Regards,
    > >
    > > Todd
    > >
    > >
    > >
    > >
    > >
    > > "Cor Ligthert" <> wrote in message
    > > news:eByIfJ%...
    > > > Hi TC,
    > > >
    > > > Keep in mind that it is not important for dotNet how it is set on the
    > > > clipboard the only thing that is important what object is on the

    > > clipboard.
    > > >
    > > > Here some links that should answer all your questions.
    > > >
    > > >

    > >

    http://msdn.microsoft.com/library/d.../vbcon/html/vbconDragDropClipboardSupport.asp
    > > >
    > > >

    > >

    http://msdn.microsoft.com/library/d.../en-us/dv_vstechart/html/vbtchimpdragdrop.asp
    > > >
    > > > I hope this helps a little bit?
    > > >
    > > > Cor
    > > >
    > > >

    > >
    > >
    > >
     
    TC, Aug 31, 2004
    #5
  6. Re: Using VB.Net or C#, utilizing the clipboard object, how to cop

    Hi Todd,

    It's nice to hear from you.

    Regards,
    Girish Kumar

    "TC" wrote:

    > Hey Girish,
    >
    > Sorry for the delayed response.
    >
    > I just wanted to thank you for the first very clear and direct answer to
    > this question.
    >
    > Best Regards,
    >
    > Todd
    >
    > "GirishKumar" <> wrote in message
    > news:...
    > > Hi Todd,
    > >
    > > A class named ClipBoard is present in the namespace System.Windows.Forms.

    > This class has only 2 methods - to set and get the content to and from
    > ClipBoard. The Get method returns an IDataObject interface that has methods
    > to identify the format of the clip board content, but not the reference
    > information you needed.
    > >
    > > Regards,--
    > > Girish Kumar
    > > ICICI Infotech
    > >
    > >
    > > "TC" wrote:
    > >
    > > > Hey Cor & Other Folks,
    > > >
    > > > OK, let me clarify a bit here.
    > > >
    > > > Using the WIN32 API, there is a clipboard format called "OwnerLink".
    > > > Similarly to the .Net clipboard, one would register this format, check

    > for
    > > > it on the clipboard and then retrieve using several API calls.
    > > >
    > > > There are also clipboard formats called "Link Descriptor" and "Object
    > > > Descriptor" under WIN32.
    > > >
    > > > I guess it fair to say that, under .Net, there are currently no methods

    > or
    > > > properties available to extract a source reference when a user places an
    > > > Office object / graphic on the clipboard.
    > > >
    > > > If there is a workaround, by all means, please share.
    > > >
    > > > Best Regards,
    > > >
    > > > Todd
    > > >
    > > >
    > > >
    > > >
    > > >
    > > > "Cor Ligthert" <> wrote in message
    > > > news:eByIfJ%...
    > > > > Hi TC,
    > > > >
    > > > > Keep in mind that it is not important for dotNet how it is set on the
    > > > > clipboard the only thing that is important what object is on the
    > > > clipboard.
    > > > >
    > > > > Here some links that should answer all your questions.
    > > > >
    > > > >
    > > >

    > http://msdn.microsoft.com/library/d.../vbcon/html/vbconDragDropClipboardSupport.asp
    > > > >
    > > > >
    > > >

    > http://msdn.microsoft.com/library/d.../en-us/dv_vstechart/html/vbtchimpdragdrop.asp
    > > > >
    > > > > I hope this helps a little bit?
    > > > >
    > > > > Cor
    > > > >
    > > > >
    > > >
    > > >
    > > >

    >
    >
    >
     
    =?Utf-8?B?R2lyaXNoS3VtYXI=?=, Sep 1, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TC
    Replies:
    0
    Views:
    731
  2. Replies:
    2
    Views:
    781
  3. Dan Bishop
    Replies:
    0
    Views:
    249
    Dan Bishop
    Aug 26, 2008
  4. Mahsha

    Clipboard - Copy Image To Clipboard

    Mahsha, Jun 1, 2009, in forum: Javascript
    Replies:
    1
    Views:
    604
    Thomas 'PointedEars' Lahn
    Jun 1, 2009
  5. Mahsha

    Clipboard - Copy Text To Clipboard

    Mahsha, Jun 1, 2009, in forum: Javascript
    Replies:
    3
    Views:
    665
    Thomas 'PointedEars' Lahn
    Jun 1, 2009
Loading...

Share This Page