|
-
Jun 21st, 2000, 07:57 AM
#1
Thread Starter
Addicted Member
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
-
Jun 21st, 2000, 08:02 AM
#2
Fanatic Member
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
{;->
-
Jun 21st, 2000, 08:04 AM
#3
Lively Member
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
-
Jun 21st, 2000, 08:05 AM
#4
Lively Member
Sorry, my misunderstanding
-
Jun 21st, 2000, 08:08 AM
#5
Thread Starter
Addicted Member
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
-
Jun 21st, 2000, 08:42 AM
#6
Lively Member
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
-
Jun 21st, 2000, 06:00 PM
#7
PowerPoster
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()
-
Jun 21st, 2000, 08:46 PM
#8
Thread Starter
Addicted Member
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..
-
Jun 22nd, 2000, 06:27 AM
#9
Thread Starter
Addicted Member
Please Help
Hello guys
PLEASE HELP ME, I REALLY NEED THIS
-
Jun 22nd, 2000, 06:35 AM
#10
Lively Member
It's an unusual problem. Could you not just create a new instance of the picture box?
-
Jun 22nd, 2000, 06:42 AM
#11
Thread Starter
Addicted Member
-
Jun 22nd, 2000, 06:45 AM
#12
transcendental analytic
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.
-
Jun 22nd, 2000, 06:56 AM
#13
Thread Starter
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|