image display on window form
-
hi every buddy i have to display a image on the page to how to do that? image is a animated image, plz help.
Rajeev Kr. Sharma VRI Software Pvt.Ltd. New Delhi India HumOnline.com Stay Connected
-
hi every buddy i have to display a image on the page to how to do that? image is a animated image, plz help.
Rajeev Kr. Sharma VRI Software Pvt.Ltd. New Delhi India HumOnline.com Stay Connected
-
hi every buddy i have to display a image on the page to how to do that? image is a animated image, plz help.
Rajeev Kr. Sharma VRI Software Pvt.Ltd. New Delhi India HumOnline.com Stay Connected
-
RajeevKumarSharma wrote:
display a image on the page
If you mean a web page, you can use Img[^] tag If you are trying to use display it in a form, use PictureBox[^] control
*jaans
private Bitmap MyImage ; public void ShowMyImage(String fileToDisplay, int xSize, int ySize) { // Sets up an image object to be displayed. if (MyImage != null) { MyImage.Dispose(); } // Stretches the image to fit the pictureBox. pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage ; MyImage = new Bitmap(fileToDisplay); HOW TO GIVE HERE FILE PATH WHICH EXIST IN MY PROJECT pictureBox1.ClientSize = new Size(xSize, ySize); pictureBox1.Image = (Image) MyImage ; } please look on the bold,under line text
Rajeev Kr. Sharma VRI Software Pvt.Ltd. New Delhi India HumOnline.com Stay Connected
-
private Bitmap MyImage ; public void ShowMyImage(String fileToDisplay, int xSize, int ySize) { // Sets up an image object to be displayed. if (MyImage != null) { MyImage.Dispose(); } // Stretches the image to fit the pictureBox. pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage ; MyImage = new Bitmap(fileToDisplay); HOW TO GIVE HERE FILE PATH WHICH EXIST IN MY PROJECT pictureBox1.ClientSize = new Size(xSize, ySize); pictureBox1.Image = (Image) MyImage ; } please look on the bold,under line text
Rajeev Kr. Sharma VRI Software Pvt.Ltd. New Delhi India HumOnline.com Stay Connected
Just use the relative path for fileToDisplay. Example: "cool.bmp" or "..\\images\\cool.bmp".
Cheers, Vikram.
"I will put my new found knolage to good use" - Captain See Sharp. "Every time Lotus Notes starts up, somewhere a puppy, a kitten, a lamb, and a baby seal are killed." - Gary Wheeler.
-
hi every buddy i have to display a image on the page to how to do that? image is a animated image, plz help.
Rajeev Kr. Sharma VRI Software Pvt.Ltd. New Delhi India HumOnline.com Stay Connected
This should do what you want Bitmap pic = new Bitmap(fname); xsize = pic.Width; ysize = pic.Height; // Adjust the position of the picture box pictureBox1.Location = new System.Drawing.Point((0, 0); // Adjust the size of the picture box pictureBox1.Size = new System.Drawing.Size(xsize, ysize); // Display the image pictureBox1.Image = pic;