[Mono-winforms-list] Dynamic drawing of Images on the form
Abir Bhattacharya
abirb at 2pirad.com
Wed Sep 12 07:16:06 EDT 2007
HI,
I need to display some dynamic images on a windows form at regular intervals
based on some logic. The code runs perfectly fine with .NET and as well as
the Win MONO(1.2.4) platforms , but when I port the identical code to the
Mono develop running on the Linux (2.6.22-Fedora) the images are displayed
in sporadic bursts .
The code snippet:
protected override void OnPaint(PaintEventArgs e)
{
//base.OnPaint(e);
Graphics gr ,gf;
gr = e.Graphics;
gf = Graphics.FromHwnd(this.Handle);
for (; intCtr < Cntr; intCtr += 1)
{
// call the final rect
//passEncStr = enS.EnCodeString((string)a2[intCtr]);
PaintFinalRect(enS.EnCodeString((string)a2[intCtr]),gr);
Thread.Sleep(100);
base.OnPaint(e);
gf.FillRectangle(new SolidBrush(this.BackColor),
this.ClientRectangle);
gr.Dispose();
if (intCtr == Cntr - 1)
{
intCtr = 0;
}
}
return;
}
I s there a problem with the primary thread Sleep methods ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20070912/355deff1/attachment-0001.html
More information about the Mono-winforms-list
mailing list