not able to view Picture box on the form
-
I have written following code but It is not displayed on the form pictureBox1 = new System.Windows.Forms.PictureBox(); pictureBox1.Location = new Point(Wnd[18].Left + 2, Wnd[18].Top + 2); pictureBox1.Name = "pictureBox1"; pictureBox1.Size = new System.Drawing.Size(80, 40); pictureBox1.Image = new System.Drawing.Bitmap("c:\\bitmap1.bmp"); pictureBox1.Show(); pictureBox1.BringToFront(); what to do ?
thanks
-
I have written following code but It is not displayed on the form pictureBox1 = new System.Windows.Forms.PictureBox(); pictureBox1.Location = new Point(Wnd[18].Left + 2, Wnd[18].Top + 2); pictureBox1.Name = "pictureBox1"; pictureBox1.Size = new System.Drawing.Size(80, 40); pictureBox1.Image = new System.Drawing.Bitmap("c:\\bitmap1.bmp"); pictureBox1.Show(); pictureBox1.BringToFront(); what to do ?
thanks
you have to add the control to the form Form1.controls.add(picturebox1);
-
I have written following code but It is not displayed on the form pictureBox1 = new System.Windows.Forms.PictureBox(); pictureBox1.Location = new Point(Wnd[18].Left + 2, Wnd[18].Top + 2); pictureBox1.Name = "pictureBox1"; pictureBox1.Size = new System.Drawing.Size(80, 40); pictureBox1.Image = new System.Drawing.Bitmap("c:\\bitmap1.bmp"); pictureBox1.Show(); pictureBox1.BringToFront(); what to do ?
thanks
Have you forgot
formObject.Controls.Add(pictureBox1)
?Navaneeth How to use google | Ask smart questions