Results 1 to 13 of 13

Thread: Another nice question!! Please Help

  1. #1

    Thread Starter
    Addicted Member Mih_Flyer's Avatar
    Join Date
    Mar 2000
    Location
    some place there
    Posts
    241

    Talking

    Hello,
    I have a Picture box which has labels and images and shapes inside it, and i want to copy this picture box with every thing in it to another form in my app, how the hell i do this???
    Please Help

  2. #2
    Fanatic Member
    Join Date
    Jan 1999
    Location
    UK
    Posts
    554
    as long as everything else (the labels etc) are physically inside the picturebox, so that when you drag the picture box, all its contents move with it - then :
    just click on the picturebox itself (with left mouse button) and then EDIT > COPY from menu

    just click on the picturebox itself (with right mouse button) and then COPY from popupmenu

    to paste
    click on new form and EDIT > PASTE


    DocZaf
    {;->

  3. #3
    Lively Member
    Join Date
    Jun 2000
    Posts
    82
    There are several ways to accomplish this. Anything you draw on a picture box becomes a part of its image. If you want to then transfer this image to another control you can:

    Set the picture property of the new obect to match the image property of the old
    Code:
    Form2.picture=Picture1.Image
    Use the paintpicture command
    Code:
    Picture1.Picture=Picture1.Image
    Form2.paintpicture Picture1.Picture,0,0

  4. #4
    Lively Member
    Join Date
    Jun 2000
    Posts
    82
    Sorry, my misunderstanding

  5. #5

    Thread Starter
    Addicted Member Mih_Flyer's Avatar
    Join Date
    Mar 2000
    Location
    some place there
    Posts
    241
    ok thanx, but this wasn't what i need, what i need is to make a copy of the picture box and it's contents and put it in another form DURING THE RUN TIME, Please help

  6. #6
    Lively Member
    Join Date
    Jun 2000
    Posts
    82
    Well my misunderstanding wasn't one after all.

    Say you have a picture box called Picture1 on Form1, and a picture box on Form2 called Picture1 as well. You would draw your shapes onto the first picture box, then to copy them to the second during run-time you would use this code in a command button or something:

    Code:
    Form2.Picture1.Picture=Form1.Picture1.Image

  7. #7
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Lightbulb Try to use Clipboard

    May be you can use the Clipboard Object?

    Code:
      'Copy Image from PictureBox Control into Clipboard 
      Clipboard.SetData Picture1.Picture
      
      'Retrieve the Image from Clipboard into a new PictureBox Control
      Picture2.Picture = Clipboard.GetData()

  8. #8

    Thread Starter
    Addicted Member Mih_Flyer's Avatar
    Join Date
    Mar 2000
    Location
    some place there
    Posts
    241

    Angry WE HAVE A BIG BIG MISUNDERSTANDING IN HERE

    ok ok ok ok
    WE HAVE A BIG BIG MISUNDERSTANDING IN HERE, i know every thing you said, this will work if i want to copy the picture from one picbox to another, but my question is:
    [b]I have a picture box which has controls in it, like label inside the picture box and imagebox inside the picture box and anpther small picture boxes inside the big picture box, and i want to make a copy of these stuff "the big picture box and the other controls inside it" to another form, GOT IT OR NOT, Please help..

  9. #9

    Thread Starter
    Addicted Member Mih_Flyer's Avatar
    Join Date
    Mar 2000
    Location
    some place there
    Posts
    241

    Arrow Please Help

    Hello guys
    PLEASE HELP ME, I REALLY NEED THIS

  10. #10
    Lively Member
    Join Date
    Jun 2000
    Posts
    82
    It's an unusual problem. Could you not just create a new instance of the picture box?

  11. #11

    Thread Starter
    Addicted Member Mih_Flyer's Avatar
    Join Date
    Mar 2000
    Location
    some place there
    Posts
    241

    Exclamation

    What do you mean???

  12. #12
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Make the picturebox an array, use load statement to load a new instance of it and then use setparent api to put it in the other form
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  13. #13

    Thread Starter
    Addicted Member Mih_Flyer's Avatar
    Join Date
    Mar 2000
    Location
    some place there
    Posts
    241
    Thanx Kedaman, i will try to figure it out

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width