Not enough storage is available to process this command

Jan 23, 2009 at 9:10 AM
Hi guys love the controls but i keep getting the following error, has anyone else getting this or am I doing something wrong or is there a fix, I will paste the information below.

            public void Draw(Graphics gx, Rectangle bounds)

            {

                  ImageInfo imgInfo;

                  _image.GetImageInfo(out imgInfo);

 

                  if (_alpha == 0)

            {

                // Draw the image, with alpha channel if any

                        IntPtr hdcDest = gx.GetHdc();

                        Rectangle dstRect = new Rectangle(bounds.X, bounds.Y, (int)imgInfo.Width + bounds.X, (int)imgInfo.Height + bounds.Y);

                        _image.Draw(hdcDest, ref dstRect, IntPtr.Zero);

                        gx.ReleaseHdc(hdcDest);

              }

TThe highlighted area is were the error appears with the following message:

System.Runtime.InteropServices.COMException was unhandled

  Message="Not enough storage is available to process this command. "

  ErrorCode=-2147024888

  StackTrace:

    at PlatformAPI.IImage.Draw()

    at AlphaMobileControls.AlphaImage.Draw()

    at AlphaMobileControls.AlphaPictureBox.Draw()

    at AlphaMobileControls.AlphaControl.DrawInternal()

    at AlphaMobileControls.AlphaContainer.OnPaint()

    at AlphaMobileControls.AlphaPanel.OnPaint()

    at System.Windows.Forms.Control.WnProc()

    at System.Windows.Forms.Control._InternalWnProc()

    at Microsoft.AGL.Forms.EVL.EnterMainLoop()

    at System.Windows.Forms.Application.Run()

    at Mobile_PDA_Bulkhaul.frmMain.Main()