473,499 Members | 1,955 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Im getting image from form1 picbox1 to new form picbox1 how to show it in fullscreen?

69 New Member
I have a new form. Now in form1 im showing images in picturebox1.

Now i did a double click event of picturebox1 and when you click double on the picturebox1 its openning a new form.

On the new form i added a split container on the right i added some labels buttons....on the left on panel1 i added a picturebox and did the picturebox to be Dock FILL!

Now i created on the new form code a function that will get the images from form1 and put it in the new form picturebox1 on panel1.

In the new form i want the picturebox1 to be on all over the panel1 thats why i set it to dock.FILL!
But when i see the image in the new form i see it on the same size as it in form1 and only on the left corner of the new form.

I want to see it in the new form all over panel1 thats why i did it DOCK FILL. But the image or the picturebox for some reason show the image only on the left corner side and not on all the panel1


This is the code of the new form:

Expand|Select|Wrap|Line Numbers
  1. public PictureBox picturebox1(PictureBox pb1)
  2.         {
  3.             pictureBox1.Image = pb1.Image;
  4.             return pictureBox1;
  5.         }
  6.  
And this is what i did in form1:

Expand|Select|Wrap|Line Numbers
  1. private void pictureBox1_DoubleClick_1(object sender, EventArgs e)
  2.         {
  3.  
  4.                 pb1_fs = new Picturebox1_Fullscreen();
  5.                 pb1_fs.Show();
  6.                 pb1_fs.WindowState = FormWindowState.Maximized;
  7.                 pb1_fs.picturebox1(pictureBox1);
  8.                 pb1_fs.FormClosing += new FormClosingEventHandler(pb1_fs_FormClosing);
  9.  
  10.         }
  11.  

Why the image in the new form isnt all over the panel1 area ? I thought if i did the picturebox1 in the new form to be dock fill on the panel1 it will show the image all over it but it dosent.
May 6 '11 #1
1 1772
GaryTexmo
1,501 Recognized Expert Top Contributor
On a PictureBox, there's a SizeMode property that I believe you can set to either Stretch, or Zoom. Stretch will stretch the image to fit the PictureBox completely, ignoring aspect ratio. Zoom will maintain the aspect ratio so it may not fill the PictureBox completely, but it will make the image as large as possible.

So on the PictureBox that you have filling the panel, set the SizeMode property to whatever is appropriate for you.
May 6 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
3970
by: Jeff Griffin | last post by:
OK, this should be my last question for the day. I have spent a couple hours on google trying to figure this out but I probibly just dont know what I really need to be searching for. I have a...
4
6531
by: Altramagnus | last post by:
I have a form first created my the main thread. I have another thread monitoring the IO. Upon receiving certain message, I want to show/unhide the form. When the form is first created ( handle...
7
2035
by: moondaddy | last post by:
I'm painting images onto a windows form using this method: e.Graphics.DrawImageUnscaled(m_ItemImage, x, y) every time I select a product. However, some products don't have an image so when a...
1
2127
by: Wolfgang | last post by:
I'm a Java developer relatively new to to VB .NET (and I don't know the old VB6 at all). I know how to draw lines, circles and other simple shapes on a form in VB.NET (using the onPaint event)....
2
1393
by: joe | last post by:
how to read image from sql server to show in a image
0
2423
by: Miguel Pires | last post by:
Hi all, I have one Mdi Container (Parent) and on this form i wont to set a small image in bottom Right corner, i have insert a imagebox and all was ok until i open a mdi child form and move were...
2
4994
by: mahesh123 | last post by:
Hi Folks, I Want regarding the stretching image on the MDI Form? I have one MDI Form and there is a image on that form? so that i want to stretch the image on the form according to the screen...
3
2381
by: agarwalsunitadhn | last post by:
hello i am working in C#.net. I want to know how to close one form and show another one. I had done the following code this.Hide(); MainForm frm = new...
1
1260
vdraceil
by: vdraceil | last post by:
Is it possible to capture an image of a video running in fullscreen mode? -"printscreen" wont help!! any idea guys?
3
1471
by: kkshansid | last post by:
<?php session_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html...
0
7131
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7007
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7174
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4600
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3099
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
297
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.