add picturebox during runtime and loading image into picturebox
i'm doing a simple form tat could add picturebox during runtime and i could add several picture into it. is thr any simple solution for this matter?
Re: add picturebox during runtime and loading image into picturebox
vb Code:
dim pb as new picturebox
pb.location = new point(50,50)
pb.sizemode = autosize 'check this
pb.image = new bitmap(filename)
me.controls.add(pb)
Re: add picturebox during runtime and loading image into picturebox
hi paul, i gt a bit blur.. can u giv me de full coding.. stil cant figure out hw it works? sry if my question was silly..
Re: add picturebox during runtime and loading image into picturebox
vb Code:
Private Sub RichTextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RichTextBox1.TextChanged
Dim pb As New PictureBox
pb.Location = New Point(50, 50)
pb.SizeMode = AutoSize 'check this
pb.Image = New Bitmap(filename)
Me.Controls.Add(pb)
End Sub
i put it like tis.. i dunno y gt error.. name "filename" is nt declare.. but i dy declare it..
Re: add picturebox during runtime and loading image into picturebox
pb.Image = New Bitmap("c:\aValidFilename.bmp")
Re: add picturebox during runtime and loading image into picturebox
hey paul.. :wave:
i changed de code dy.. but dun hv picturebox appear at my richtextbox thr.. and whn i add pic into it de pic bcum blur after i drag it into smaller size.. can u tel me wat de prob?
thx..