[Mono-dev] mono X11 rendering

Harry harry_tanama at yahoo.com
Fri Oct 14 04:03:50 EDT 2005

Hi guys,
(sorry for the typo in the previous email)

I am developing a simple applications using Thread
class to change the color of the square (Lab
assignment). Everything is working properly, except I
have to drag or cls /opn the windows in linux to fix
theThread and the only solutions to produce the color

I think it has something todo with the X11 rendering
in Linux. Are there any solutions to this problems? 

here is my code: (This code should be working in MS

using System;
using System.Windows.Forms;
using System.Threading;
using System.Drawing;

public class ColoredBoxes : Form
	private Color c;
	public ColoredBoxes()
		Thread t = new Thread(new ThreadStart(Run));
	protected override void OnPaint(PaintEventArgs e)
		Graphics g = e.Graphics;
		Pen blue = new Pen(c, 3);				
		g.DrawRectangle(blue, 100,100,30,30);

	public void Run()
		Random r = new Random();
			c = Color.FromArgb(r.Next(256), r.Next(256),


public class Test{
	public static void Main()
		Application.Run(new ColoredBoxes());

Thank you for all your help guys


Harry Tanama
Powerd by GNU/LiNUX  

"Let Christ be glorify in our words and actions."

"Jesus Christ save the entire human race from sins & GNU/Linux save human from high cost software applications."

Yahoo! Music Unlimited 
Access over 1 million songs. Try it free.

More information about the Mono-devel-list mailing list