I wrote this:
- int abc = 0;
- foreach (SubPod subPod in pod.SubPods)
- {
-
-
-
-
-
- WebClient webClient = new WebClient();
- webClient.DownloadFile(new Uri(subPod.Image.Src.Trim()), @"Pictures\\" + abc + ".png");
-
- Form newForm = new Form();
- newForm.Size = new Size((subPod.Image.Width) + 10, (subPod.Image.Height) + 37);
- newForm.MaximizeBox = false;
- newForm.MinimizeBox = false;
- newForm.Text = subPod.Title;
- newForm.StartPosition = FormStartPosition.Manual;
- newForm.ShowIcon = false;
- newForm.ShowInTaskbar = false;
- newForm.TopMost = true;
- newForm.MinimumSize = newForm.Size;
-
- PictureBox newImage = new PictureBox();
- newImage.ImageLocation = @"Pictures\\" + abc + ".png";
- newImage.Dock = DockStyle.Fill;
- newImage.SizeMode = PictureBoxSizeMode.Zoom;
- newImage.MouseDown += new MouseEventHandler(newImage_MouseDown);
- newImage.CancelAsync();
- newForm.Controls.Add(newImage);
- newForm.Show();
- abc++;
- }
- abc = 0;
The debug process OK, but it runs poorly. Images are not loaded, the windows contain them freeze, I tried both load directly using Image.Load(src) and indirectly (as above - download then load) but it still not load.
Any suggestion? The code is a mess, sorry :P
I also attached the entire code, so you can see the error clearly.
P/s: Click record (wait for a second) and ask sth like: WHo is Bill Gates? It will load the code above and you will understand the error