Code:Private Sub PlaceImage(ByVal image As String, ByVal layout As String, ByVal control As String) Dim MyWebClient As New System.Net.WebClient Dim ImageInBytes() As Byte = MyWebClient.DownloadData(image) Dim ImageStream As New IO.MemoryStream(ImageInBytes) Dim picture As New PictureBox picture = PictureBox1 PictureBox1.Image = New System.Drawing.Bitmap(ImageStream) If layout = "sm" Or "small" Then PictureBox1.BackgroundImageLayout = ImageLayout.Stretch End If End Sub Private Sub frmLauncher_Load(sender As Object, e As EventArgs) Handles MyBase.Load PlaceImage("http://admin.ecolosseum.net/Content/images/login-symbol.jpg", "sm", "PictureBox1")
I would like to make a function to place images wherever i want easy. I'm having difficulty telling it what control to use. I have unfinished code above, any help?




Reply With Quote
