Solved

C# Winform, display image column by URL.

Posted on 2011-09-11
4
1,676 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to LOAD up a .NET Framework website with data? 2 41
Linq Help 1 35
How do ASP.NET and MVC work together? 4 28
Not showing page correctly 3 30
Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

920 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now