Forum: VB.NET |
Thema:
Re: bissi listbox, bissi picturebox |
Von:
Daniel Röber (
13.12.2005 11:02) |
Für die picturebox:
Quick and dirty, aber es tut .. :)
Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
Try
'save the size of the picturebox
Dim width As Integer = Me.PictureBox1.Width
Dim height As Integer = Me.PictureBox1.Height
'grab the picturebox's image
Dim img As Image = Me.PictureBox1.Image
'rotate the image
img.RotateFlip(RotateFlipType.Rotate90FlipNone)
'set the picturebox's image
Me.PictureBox1.Image = img
'swop the width and the height of the picturebox
Me.PictureBox1.Width = height
Me.PictureBox1.Height = width
Catch ex As Exception
MessageBox.Show(ex.GetBaseException.Message)
End Try
End Sub
Für die Listbox:
ListBox2.Items.AddRange(ListBox1.Items)
DAN
Antworten
Vorsicht bei der Eingabe: Die Zeichen ' oder -- sind nicht erlaubt!