Re: Invalid parameter used
- From: "RobinS" <RobinS@xxxxxxxxxxxxxxx>
- Date: Sun, 28 Jan 2007 22:22:32 -0800
You posted this to at least the following newsgroups:
microsoft.public.dotnet.framework
microsoft.public.dotnet.general
microsoft.public.dotnet.languages.csharp
microsoft.public.dotnet.languages.vb
but not to
microsoft.public.dotnet.framework.drawing.
When you post a message to multiple groups, please post all of
them at once. That way, if someone in one group provides a
solution, the solution will be posted to all of the groups.
Also, if someone in another group is working on a solution,
they will know it has been solved, and they can work on helping
somebody else.
Also please do not post to newsgroups that are not pertinent,
like in this case, the VB newsgroups, when you have a C# issue.
Robin S.
-------------------------------------------
"JayvardhanPune" <jayvardhan.patil@xxxxxxxxxxxxxx> wrote in message
news:1170050163.856443.14690@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I am facing a problem with my GDI++ code in C# control.
Though i have tried many things from last 6 months, i am not able to
get completely rid of this bug.
Whenever the user is opening a window or closing a window, i'm getting
following exception.
This is a very rare exception but it causes the whole application
crash
and has become a nigtmare for me.
This problem is more frequent on Citrix client as compared to normal
desktop environment.
InnnerException: Invalid parameter used.
Stack Trace: at System.Drawing.Region.GetHrgn(Graphics g)
at System.Windows.Forms.Control.GetHRgn(Region region)
at System.Windows.Forms.Control.OnHandleCreated(EventArgs e)
at System.Windows.Forms.Control.WmCreate(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32
msg, IntPtr wparam, IntPtr lparam)
Source: System.Drawing
I have done following coding in a control which is derived from
System.Windows.Forms.Button
protected override void OnPaint(PaintEventArgs e)
{
if(this != null)
{
if(!this.IsDisposed && !this.Disposing)
{
using(GraphicsPath path = new
GraphicsPath(FillMode.Alternate))
{
path.AddEllipse(0, 0, this.Width, this.Height);
using(Region rgn = new Region(path).Clone())
{
ctrl.Region=rgn.Clone();
}
}
}
}
}
I'll appriciate if you can provide some help.
.
- References:
- Invalid parameter used
- From: JayvardhanPune
- Invalid parameter used
- Prev by Date: Re: smo create database object
- Next by Date: Re: Looking for a grphical audio analyzer component
- Previous by thread: Invalid parameter used
- Next by thread: Dynamic cast with generics
- Index(es):