0
I would like to display a promotional image within a PicutreBox
in my app, but this image will vary according to the promotion that the Company will make.
Is there any code that PictureBox
show a certain image that is hosted somewhere?
Something similar to HTML, when we need to pull an image from a Host or FTP, we use:
src="img/logobranco.png"
Any code in C# that does the same function?
Windows Forms? WPF? Web Forms? ASP.NET MVC? Nancy? C# is "only" the programming language...
– Jéf Bueno
I’m using Windows Forms.
– Maurício Sanches
You want to use a web image to put on
PictureBox
?– Jéf Bueno
@jbueno Fetched on the Web or Fetched from a database, ftp..
– Maurício Sanches
Each case is a different case. Basically, having the address of the image (as long as it is public) is just putting the path in the property I mentioned below. Or else, as long as you have an object
Image
just set the propertyImage
ofPictureBox
. If your doubt is just like "instantiating aImage
" from these sources, better open a specific question explaining this. Plus, you’ll need a question for each type (FTP, HTTP, Database, file system local, etc..).– Jéf Bueno