[vb.net] 웹 이미지를 vb.net 에서 불러오는 함수

하나를하더라도최선을 2020-08-29 16:24:41 33,945 0 0
Public Function WebImageView(ByVal URL As StringAs Bitmap
    Try
        Dim Downloader As WebClient = New WebClient()
        Dim ImageStream As Stream = Downloader.OpenRead(URL)
        Dim DownloadImage As Bitmap = TryCast(Bitmap.FromStream(ImageStream), Bitmap)
        Return DownloadImage
    Catch ex As Exception
        Return DirectCast(Nothing, Bitmap)
    End Try
End Function
 

댓글 0개

첫 번째 댓글을 작성해보세요!