[Mono-winforms-list] DataGrid ctor: OutOfMemoryException

Maurice Michalski moscht at gmx.de
Sun Dec 3 10:03:58 EST 2006


with Mono 1.2.1 (using Windows XP), I tried to create a DataGrid control. My
code looks like this:

public Form1() {
     DataGrid grd = new DataGrid();


The following exception is thrown when the program is started with "mono
myapp.exe" (executing the program with MS.NET does not cause any errors):

Unhandled Exception: System.OutOfMemoryException: Out of memory.
  at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000]
  at System.Drawing.Graphics.DrawImage (System.Drawing.Image image,
Rectangle destRect, Int32 srcX, Int32 srcY, Int32 srcWidth, Int32 srcHeight,
GraphicsUnit srcUnit, System.Drawing.Imaging.ImageAttributes imageAttr)
  at (wrapper remoting-invoke-with-check) System.Drawing.Graphics:DrawImage
  at System.Drawing.Bitmap.MakeTransparent (Color transparentColor)
  at (wrapper remoting-invoke-with-check)
  at System.Windows.Forms.DataGrid..ctor () [0x00000]
  at (wrapper remoting-invoke-with-check)
System.Windows.Forms.DataGrid:.ctor ()

  at myapp.UI.frmMain..ctor () [0x00000]
  at (wrapper remoting-invoke-with-check) myapp.UI.frmMain:.ctor ()
  at myapp.Program.Main () [0x00000]

Other controls like textboxes, combos, labels, listviews, etc. are working
with Mono without any error.
The code's compiled without errors with mcs. Does anybody know what I am
doing wrong? :)


View this message in context: http://www.nabble.com/DataGrid-ctor%3A-OutOfMemoryException-tf2746878.html#a7663672
Sent from the Mono - WinForms mailing list archive at Nabble.com.

More information about the Mono-winforms-list mailing list