Solved

C# Winform, display image column by URL.

Posted on 2011-09-11
4
1,767 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

688 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