Solved

C# Winform, display image column by URL.

Posted on 2011-09-11
4
1,693 Views
Last Modified: 2013-12-17
How can I display image column with URL in datagridview.
Ex: Cell value: \\10.107.11.11\image.jpg  --> display image in cell, not hyperlink.

Please help me!
0
Comment
Question by:JameMeck
  • 2
  • 2
4 Comments
 
LVL 40
ID: 36520594
The display of images in the DataGridView is described in the framework documentation at http://msdn.microsoft.com/en-us/library/2ab8kd75.aspx
0
 

Author Comment

by:JameMeck
ID: 36520645
How to display this string: \\10.107.11.11\image.jpg  to Bitmap?
0
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 500 total points
ID: 36520988
System.Net.WebClient webSource = new System.Net.WebClient ( );
byte[] data = webSource.DownloadData ( "http://10.107.11.11/image.jpg  ");
System.IO.MemoryStream pipe = new System.IO.MemoryStream(data);
Image jpgImage = Image.FromStream(pipe);

Open in new window

Then use the the code referenced in my last post to display jpgImage.
0
 

Author Closing Comment

by:JameMeck
ID: 36558044
Thanks! I got it.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question