[Mono-dev] mono X11 rendering

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

Hi guys, 

I am not sure where to post this questions. Hopefuly
you guys are able to answer my questions:

I am developing a simple applications using Thread
class to change the color of the square (Lab

everything working correctly, accept I have to drag
the windows in linux to let the Thread working to
change the color of a square. 

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

here is my code: 
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