Copy/Paste multiple objects

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

    #1

    Copy/Paste multiple objects

    Hi all,

    Is there a way to copy multiple objects into the clipboard and then paste
    them?
    What I want to achive is to be able to copy UI controls (textedits,
    dropdowns, etc) from one form and paste them into another form.

    Your help is much appriciated. Thanks in advance,
    Greg.


  • psg

    #2
    Re: Copy/Paste multiple objects

    "Greg" <ggasteratos@me tastorm.com.NO. SPAM> wrote in message
    news:Ojau16SVFH A.2540@tk2msftn gp13.phx.gbl...[color=blue]
    > Is there a way to copy multiple objects into the clipboard and then paste
    > them?
    > What I want to achive is to be able to copy UI controls (textedits,
    > dropdowns, etc) from one form and paste them into another form.
    >
    > Your help is much appriciated. Thanks in advance,[/color]

    just select controls with mouse (with help of CTRL - one by one), then
    Edit->Copy (or CTRL+C), go to a destination form and Edit->Paste (or CTRL+V)
    ..... like in a word processor

    PZDR PSG


    Comment

    • Greg

      #3
      Re: Copy/Paste multiple objects

      It doesn't work. It seems that I cannot copy/paste a single textbox let
      alone multiple textboxes.
      Here is the example I used for a single text box:

      Clipboard.SetDa taObject(textBo x2);
      IDataObject iData = Clipboard.GetDa taObject();
      TextBox newTextBox = (TextBox)iData. GetData(DataFor mats.Serializab le);

      textBox2 exists already on the form.

      What is returned by GetData is a null reference.

      Please help....


      Comment

      Working...