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

하나를하더라도최선을
2020-08-29 16:24
3,214
0
본문
Public Function WebImageView(ByVal URL As String) As 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