G
Guest
I'm working on a usercontrol, and an associated ControlDesigner for it.
In the designer, when I mouse over a particular area of the usercontrol, I
want to change the cursor from the standard SizeAll, to SizeWE.
In the class for my derived ControlDesigner, i have the following code:
protected override void OnSetCursor()
{
try
{
if (this._InSplitter)
{
this.Control.Cursor = Cursors.SizeWE;
}
else
{
base.OnSetCursor();
}
}
catch (Exception e)
{
MessageBox.Show(e.Message);
}
}
Everything else, in both my control and designer, function normally.
However, when I mouse over the designated area and the above code is
triggered, the IDE crashes. Actually, i wouldn't call it crashing, it just
disappears w/o warning. The whole IDE instance is gone. Any one have any
clues? The offending line is
this.Control.Cursor = Cursors.SizeWE;
I have tried using the same line of code elsewhere in my designer class, and
while it doesn't crash, it doesn't work either.
I've tried this on my laptop using C# 2005 Express, and my desktop using the
full VS pro 2005, with the same results.
Any help greatly appreciated,
Joe
In the designer, when I mouse over a particular area of the usercontrol, I
want to change the cursor from the standard SizeAll, to SizeWE.
In the class for my derived ControlDesigner, i have the following code:
protected override void OnSetCursor()
{
try
{
if (this._InSplitter)
{
this.Control.Cursor = Cursors.SizeWE;
}
else
{
base.OnSetCursor();
}
}
catch (Exception e)
{
MessageBox.Show(e.Message);
}
}
Everything else, in both my control and designer, function normally.
However, when I mouse over the designated area and the above code is
triggered, the IDE crashes. Actually, i wouldn't call it crashing, it just
disappears w/o warning. The whole IDE instance is gone. Any one have any
clues? The offending line is
this.Control.Cursor = Cursors.SizeWE;
I have tried using the same line of code elsewhere in my designer class, and
while it doesn't crash, it doesn't work either.
I've tried this on my laptop using C# 2005 Express, and my desktop using the
full VS pro 2005, with the same results.
Any help greatly appreciated,
Joe