Ayuda con picturebox y boton
Publicado por Marcelo (1 intervención) el 06/07/2007 23:13:41
Hola alguien me puede decir como se hace para insertar una imagen en un picturebox por medio de un commandbutton en visual 6.0 porfa.
yo tengo ete codigo que es para .net
Dim openfiledialog1 as New openfiledialog()
With openfiledialog1
.InitialDirectory = "C:\"
.Filter = "All Image Formats (*.bmp;*.jpg;*.jpeg;*.gif;*.tif)|" & _
"*.bmp;*.jpg;*.jpeg;*.gif;*.tif|Bitmaps (*.bmp)|*.bmp|" & _
"GIFs (*.gif)|*.gif|JPEGs (*.jpg)|*.jpg;*.jpeg|TIFs (*.tif)|*.tif"
.FilterIndex = 1
End With
If openfiledialog1.ShowDialog() = DialogResult.OK Then
With PictureBox1
.Width = p_width
.Height = p_height
.Image = Image.FromFile(openfiledialog1.FileName)
.SizeMode = PictureBoxSizeMode.StretchImage
End With
End If
pero no me funciona en visual 6 =( de ante mano muchas gracias chau
yo tengo ete codigo que es para .net
Dim openfiledialog1 as New openfiledialog()
With openfiledialog1
.InitialDirectory = "C:\"
.Filter = "All Image Formats (*.bmp;*.jpg;*.jpeg;*.gif;*.tif)|" & _
"*.bmp;*.jpg;*.jpeg;*.gif;*.tif|Bitmaps (*.bmp)|*.bmp|" & _
"GIFs (*.gif)|*.gif|JPEGs (*.jpg)|*.jpg;*.jpeg|TIFs (*.tif)|*.tif"
.FilterIndex = 1
End With
If openfiledialog1.ShowDialog() = DialogResult.OK Then
With PictureBox1
.Width = p_width
.Height = p_height
.Image = Image.FromFile(openfiledialog1.FileName)
.SizeMode = PictureBoxSizeMode.StretchImage
End With
End If
pero no me funciona en visual 6 =( de ante mano muchas gracias chau
Valora esta pregunta


0