Solved

C# Winform, display image column by URL.

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

757 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

20 Experts available now in Live!

Get 1:1 Help Now