View Single Post
pipeline's Avatar
Posts: 693 | Thanked: 502 times | Joined on Jul 2007
#27
zybrook : although you should not have gotten that bug, it seems Gnome namespace has not been ported to maemo. Cairo has been ported though so maybe you could use samples here (i've tried these and they seem to work) :
http://www.mono-project.com/Mono.Cairo_Cookbook

As for how to do the image sample in vs2003, i just wrote the program and compiled it and copied the exe over. Its a simple program just using a timer and this (works only with winforms/gdi on 1.9) :
Code:
	public static Image ImageURIToImage(string url) 
	{
		Image image = null;

		WebClient webClient = new WebClient();

		try 
		{
			MemoryStream ms = new MemoryStream();
			Uri site = new Uri(url); 
				
			Stream stream = webClient.OpenRead(url);
			image = Image.FromStream(stream);
			image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
			stream.Close();
		}
		catch (Exception ex) 	
		{
			System.Diagnostics.Debug.WriteLine(ex.ToString());
		}

		return image;
	}
Then timer will do something like :
pictureBox1.Image = ImageURIToImage("http://mysite.com/myimage.jpg");

b-man :
Your sample program runs fine for me. The file name is case-sensitive so if its named hello.cs then compile with :
mcs hello.cs -pkg:gtk-sharp-2.0

Soon i will set up a good samples page so show alot of simple programs.

Last edited by pipeline; 2008-03-25 at 11:07.
 

The Following User Says Thank You to pipeline For This Useful Post: