|
-
Oct 28th, 2006, 03:30 AM
#1
Thread Starter
Addicted Member
a loop in my program
this is my code
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'apri file, open file
If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
PictureBox1.Image = Image.FromFile(OpenFileDialog1.FileName)
End If
Label1.Text = "altezza immagine " & PictureBox1.Image.Height & " " & vbCrLf & "larghezza immagine" & PictureBox1.Image.Width & ""
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
'salvataggio, 'save
If SaveFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
PictureBox1.Image.Save(SaveFileDialog1.FileName)
End If
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
'ridimensionamento, resize
Dim i
i = TextBox1.Text
Dim ReBMP As New Bitmap(PictureBox1.Image, PictureBox1.Image.Width * i, PictureBox1.Image.Height * i)
PictureBox1.Image = ReBMP
Label1.Text = "altezza immagine " & PictureBox1.Image.Height & " " & vbCrLf & "larghezza immagine" & PictureBox1.Image.Width & ""
End Sub
now I want to repeat my program for every photo that I select in fileopendialog.
I've activated multiselect function, and i think to insert it a loop in my program , a for, but i don't understrand where I can insert it and how can i insert it...
can you help me????
thanks!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|