[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

vikash

11/23/2004 6:24:00 AM

Hi all,

I am currently working on a C# windows application and in that i need
to do some graphics manipulation in C# .net

but at certain point dont know why, i am getting the follwing sort of
unpredicatable errors in my code

<MESSAGE>The operation completed successfully</MESSAGE>
<FUNCTION>at System.Windows.Forms.DibGraphicsBufferManager.CreateCompatibleDIB(IntPtr
hdc, IntPtr hpal, Int32 ulWidth, Int32 ulHeight, IntPtr& ppvBits) at
System.Windows.Forms.DibGraphicsBufferManager.CreateBuffer(IntPtr src,
Int32 offsetX, Int32 offsetY, Int32 width, Int32 height) at
System.Windows.Forms.DibGraphicsBufferManager.AllocBuffer(Graphics
targetGraphics, IntPtr targetDC, Rectangle targetBounds) at
System.Windows.Forms.DibGraphicsBufferManager.AllocBufferInTempManager(Graphics
targetGraphics, IntPtr targetDC, Rectangle targetBounds) at
System.Windows.Forms.DibGraphicsBufferManager.AllocBuffer(IntPtr
target, Rectangle targetBounds) at
System.Windows.Forms.Control.WmPaint(Message& m) at
System.Windows.Forms.Control.WndProc(Message& m) at
Engworks.Ink.InkPictureEx.WndProc(Message& m) at
Nagarro.Ink.NagarroInkPicture.WndProc(Message& m) in C:\EasyRC
Project\EASNew\Ink Controls\NagarroInkPicture.cs:line 751</FUNCTION>


can any body help me out what can be the problem?

Thanks
Vikash
3 Answers

Bob Powell

11/23/2004 9:52:00 AM

0

I have seen this on several occasions before and it seems to be related to
what I think is a bug in the automatic double buffering system of Windows
Forms. Unfortunately I haven't been able to put my finger on exactly what
the problem is otherwise I would have filed a bug report with MS.

My workaround for this is to use manual double buffering which is described
in Windows Forms Tips and Tricks.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tips...

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/f...

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.





"Vikash Kumar Mitruka" <vikash@nagarro.com> wrote in message
news:327fa0f3.0411222224.55b1f32b@posting.google.com...
> Hi all,
>
> I am currently working on a C# windows application and in that i need
> to do some graphics manipulation in C# .net
>
> but at certain point dont know why, i am getting the follwing sort of
> unpredicatable errors in my code
>
> <MESSAGE>The operation completed successfully</MESSAGE>
> <FUNCTION>at
System.Windows.Forms.DibGraphicsBufferManager.CreateCompatibleDIB(IntPtr
> hdc, IntPtr hpal, Int32 ulWidth, Int32 ulHeight, IntPtr& ppvBits) at
> System.Windows.Forms.DibGraphicsBufferManager.CreateBuffer(IntPtr src,
> Int32 offsetX, Int32 offsetY, Int32 width, Int32 height) at
> System.Windows.Forms.DibGraphicsBufferManager.AllocBuffer(Graphics
> targetGraphics, IntPtr targetDC, Rectangle targetBounds) at
>
System.Windows.Forms.DibGraphicsBufferManager.AllocBufferInTempManager(Graph
ics
> targetGraphics, IntPtr targetDC, Rectangle targetBounds) at
> System.Windows.Forms.DibGraphicsBufferManager.AllocBuffer(IntPtr
> target, Rectangle targetBounds) at
> System.Windows.Forms.Control.WmPaint(Message& m) at
> System.Windows.Forms.Control.WndProc(Message& m) at
> Engworks.Ink.InkPictureEx.WndProc(Message& m) at
> Nagarro.Ink.NagarroInkPicture.WndProc(Message& m) in C:\EasyRC
> Project\EASNew\Ink Controls\NagarroInkPicture.cs:line 751</FUNCTION>
>
>
> can any body help me out what can be the problem?
>
> Thanks
> Vikash


Frank Hileman

11/23/2004 10:26:00 AM

0

VG.net internally uses manual double buffering and has never had this bug,
so you may be right.

Regards,
Frank Hileman

check out VG.net: http://www.vg...
Animated vector graphics system
Integrated Visual Studio .NET graphics editor

"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:OEJRZIU0EHA.2716@TK2MSFTNGP14.phx.gbl...
>I have seen this on several occasions before and it seems to be related to
> what I think is a bug in the automatic double buffering system of Windows
> Forms. Unfortunately I haven't been able to put my finger on exactly what
> the problem is otherwise I would have filed a bug report with MS.
>
> My workaround for this is to use manual double buffering which is
> described
> in Windows Forms Tips and Tricks.
>
> --
> Bob Powell [MVP]
> Visual C#, System.Drawing
>
> Find great Windows Forms articles in Windows Forms Tips and Tricks
> http://www.bobpowell.net/tips...
>
> Answer those GDI+ questions with the GDI+ FAQ
> http://www.bobpowell.net/f...
>
> All new articles provide code in C# and VB.NET.
> Subscribe to the RSS feeds provided and never miss a new article.
>
>
>
>
>
> "Vikash Kumar Mitruka" <vikash@nagarro.com> wrote in message
> news:327fa0f3.0411222224.55b1f32b@posting.google.com...
>> Hi all,
>>
>> I am currently working on a C# windows application and in that i need
>> to do some graphics manipulation in C# .net
>>
>> but at certain point dont know why, i am getting the follwing sort of
>> unpredicatable errors in my code
>>
>> <MESSAGE>The operation completed successfully</MESSAGE>
>> <FUNCTION>at
> System.Windows.Forms.DibGraphicsBufferManager.CreateCompatibleDIB(IntPtr
>> hdc, IntPtr hpal, Int32 ulWidth, Int32 ulHeight, IntPtr& ppvBits) at
>> System.Windows.Forms.DibGraphicsBufferManager.CreateBuffer(IntPtr src,
>> Int32 offsetX, Int32 offsetY, Int32 width, Int32 height) at
>> System.Windows.Forms.DibGraphicsBufferManager.AllocBuffer(Graphics
>> targetGraphics, IntPtr targetDC, Rectangle targetBounds) at
>>
> System.Windows.Forms.DibGraphicsBufferManager.AllocBufferInTempManager(Graph
> ics
>> targetGraphics, IntPtr targetDC, Rectangle targetBounds) at
>> System.Windows.Forms.DibGraphicsBufferManager.AllocBuffer(IntPtr
>> target, Rectangle targetBounds) at
>> System.Windows.Forms.Control.WmPaint(Message& m) at
>> System.Windows.Forms.Control.WndProc(Message& m) at
>> Engworks.Ink.InkPictureEx.WndProc(Message& m) at
>> Nagarro.Ink.NagarroInkPicture.WndProc(Message& m) in C:\EasyRC
>> Project\EASNew\Ink Controls\NagarroInkPicture.cs:line 751</FUNCTION>
>>
>>
>> can any body help me out what can be the problem?
>>
>> Thanks
>> Vikash
>
>


vikash

11/24/2004 7:18:00 AM

0

Hi,

Thanks a lot for the quick response. For the work around of the
problem u were suggesting sth like manual double buffering to use.

Can u provide some good links, if u have any, on the same

also one more thing i would like to point out is that the error i m
getting at the place where i have coded following lines

[System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Demand,
Name="FullTrust")]
protected override void WndProc(ref Message m)
{
try
{
switch (m.Msg)
{
case WM_SETFOCUS:
if (this.NipFocus != null)
{
this.NipFocus(this, new System.EventArgs());
}
m.Result = IntPtr.Zero;
break;
default:
base.WndProc(ref m); //HERE IS WHAT MY EXCEPTION IS GENERATED
break;
}
return;
}
catch (Exception ex)
{
ExceptionHandler.HandleException(ex);
throw(ex);
}
}



Thanks
Vikash

"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message news:<OEJRZIU0EHA.2716@TK2MSFTNGP14.phx.gbl>...
> I have seen this on several occasions before and it seems to be related to
> what I think is a bug in the automatic double buffering system of Windows
> Forms. Unfortunately I haven't been able to put my finger on exactly what
> the problem is otherwise I would have filed a bug report with MS.
>
> My workaround for this is to use manual double buffering which is described
> in Windows Forms Tips and Tricks.
>
> --
> Bob Powell [MVP]
> Visual C#, System.Drawing
>
> Find great Windows Forms articles in Windows Forms Tips and Tricks
> http://www.bobpowell.net/tips...
>
> Answer those GDI+ questions with the GDI+ FAQ
> http://www.bobpowell.net/f...
>
> All new articles provide code in C# and VB.NET.
> Subscribe to the RSS feeds provided and never miss a new article.
>
>
>
>
>
> "Vikash Kumar Mitruka" <vikash@nagarro.com> wrote in message
> news:327fa0f3.0411222224.55b1f32b@posting.google.com...
> > Hi all,
> >
> > I am currently working on a C# windows application and in that i need
> > to do some graphics manipulation in C# .net
> >
> > but at certain point dont know why, i am getting the follwing sort of
> > unpredicatable errors in my code
> >
> > <MESSAGE>The operation completed successfully</MESSAGE>
> > <FUNCTION>at
> System.Windows.Forms.DibGraphicsBufferManager.CreateCompatibleDIB(IntPtr
> > hdc, IntPtr hpal, Int32 ulWidth, Int32 ulHeight, IntPtr& ppvBits) at
> > System.Windows.Forms.DibGraphicsBufferManager.CreateBuffer(IntPtr src,
> > Int32 offsetX, Int32 offsetY, Int32 width, Int32 height) at
> > System.Windows.Forms.DibGraphicsBufferManager.AllocBuffer(Graphics
> > targetGraphics, IntPtr targetDC, Rectangle targetBounds) at
> >
> System.Windows.Forms.DibGraphicsBufferManager.AllocBufferInTempManager(Graph
> ics
> > targetGraphics, IntPtr targetDC, Rectangle targetBounds) at
> > System.Windows.Forms.DibGraphicsBufferManager.AllocBuffer(IntPtr
> > target, Rectangle targetBounds) at
> > System.Windows.Forms.Control.WmPaint(Message& m) at
> > System.Windows.Forms.Control.WndProc(Message& m) at
> > Engworks.Ink.InkPictureEx.WndProc(Message& m) at
> > Nagarro.Ink.NagarroInkPicture.WndProc(Message& m) in C:\EasyRC
> > Project\EASNew\Ink Controls\NagarroInkPicture.cs:line 751</FUNCTION>
> >
> >
> > can any body help me out what can be the problem?
> >
> > Thanks
> > Vikash