[C#]从谷歌图片制作幻灯片/图像

问题描述:

您好。

如何制作幻灯片?og显示来自Google图片的图片?



我的表格是这样的:



1.我有一个文本框和一个图片框(或者可以显示幻灯片的东西)。

2.当我键入f.eks时。 Apple Inc,在文本框中,我希望与该文本相关的图像显示在图片框/幻灯​​片框中



我可以使用任何Image Search API吗?



我该怎么做?我不知道自己..



Hello.
How can i make a slideshow og show images from Google Images?

My form is like this:

1. I have a textbox, and a picturebox(or something that can show slideshow).
2. When i type f.eks. "Apple Inc", in the textbox, i want images related to that text to show in the picturebox/slideshow box

Is there any Image Search API i can use?

How can i do this? I have no idea myself..

How can i use this API: http://pixplorer.co.uk/#/
How can i use it to a pictureBox in C# Form?


I tried like this:
"pictureBox1.ImageLocation = "http://pixplorer.co.uk/#/apple";"
But doesn't load the image..

检查以下链接



简单的图像幻灯片放映



image slidshow usi ng c#


亲爱的,请检查解决方案。

它运行正常我已经测试过了。

Dear please check solution.
it is working fine i have tested.
string yourSearchingWord = "dog";
           //yourSearchingWord : you can add you textbox value here
           HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://pixplorer.co.uk/getimage/" + yourSearchingWord);
           WebResponse response = request.GetResponse();
           var val = new StreamReader(response.GetResponseStream()).ReadToEnd();
           var ans = val.Substring(val.IndexOf("http:"));
           ans = ans.Substring(0, ans.IndexOf("\""));
           request=(HttpWebRequest)WebRequest.Create(ans);
           response = request.GetResponse();
           Image image = Image.FromStream(response.GetResponseStream());//it will fetch image from web
           pictureBox1.Image = image; //it will show image in image box







感谢你,我学到了很多新东西。



你可以根据你的要求使用它。





如果有任何疑问,请告诉我。 b $ b



- > MU




and thanks because of you i learn so many new things.

you can use it according to your requirements.


if any Question then let me know.


-> M.U