Visual Basic.NET - VISUAL STUDIO 2005

 
Vista:

VISUAL STUDIO 2005

Publicado por SILVIA (1 intervención) el 19/05/2007 18:31:57
COMO HACER GIRAR UNA IMAGEN EN VISUAL 2005
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:VISUAL STUDIO 2005

Publicado por Harold V (411 intervenciones) el 20/05/2007 10:35:28
'Sencillamente debebes pasar el valor de rotacion a la imagen como???

Me.PicRotando.Image.RotateFlip(RotateFlipType.Rotate180FlipY)
'encontraras varias constantes para rotar tu imagen

Este sencillo y pequeño ejemplo te muestra las rotaciones posibles en el combo box y al seleccionar alguna tu imagen rotara.........

Prueba esto:

necesitas un comboBox = cboRotaciones
Picturebox con una imagen porsupuesto = picRotando

Dim Rotacion As System.Drawing.RotateFlipType

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim s() As String = [Enum].GetNames(Rotacion.GetType)
For Each Rot As String In s
Me.cboRotaciones.Items.Add(Rot)
Next
Me.cboRotaciones.Sorted = True
Me.cboRotaciones.DropDownStyle = ComboBoxStyle.DropDownList

End Sub

Private Sub cboRotaciones_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cboRotaciones.SelectedIndexChanged
picRotando.Image.RotateFlip([Enum].Parse(Rotacion.GetType, Me.cboRotaciones.SelectedItem.ToString))
picRotando.Refresh()
End Sub
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar