ControlPaint.DrawReversibleRectangle

  • Thread starter Thread starter mdahmus
  • Start date Start date
M

mdahmus

This method, found via google, appears to be the recommended way to
draw a selection rectangle in a windows.forms control; but it shows up
as unresolved when I compile, and I can't find it in MS's online help
either. What gives?

Thanks,
MD
 
This method, found via google, appears to be the recommended way to
draw a selection rectangle in a windows.forms control; but it shows up
as unresolved when I compile, and I can't find it in MS's online help
either. What gives?

Make sure the namespace 'System.Windows.Forms' is imported and a reference
to "System.Windows.Forms.dll" exists.
 
Yes, thanks for the boilerplate. Yes, I know how to compile code. When
I said that the method was missing from the class, I've obviously got
the class imported properly, or I wouldn't know that the method was
missing.

Note that I said that the method is missing from MSDN's page. See here
for yourself:

http://msdn.microsoft.com/library/d...ystemWindowsFormsControlPaintMethodsTopic.asp

The following methods are in there:
DrawReversibleFrame
DrawReversibleLine
FillReversibleRectangle

but NOT DrawReversibleRectangle.

For the time being, in order to test my code, I'm using
DrawReversibleLine (just one diagonal line which sort-of represents
what the rectangle would be). I don't want to have to issue four calls
to this method each time I need to update the rect, of course.

- MD
 
Mike Dahmus said:
Yes, thanks for the boilerplate. Yes, I know how to compile code. When
I said that the method was missing from the class, I've obviously got
the class imported properly, or I wouldn't know that the method was
missing.

Sorry. You are right. The method doesn't exist in .NET 1.0/1.1/2.0.
 
Back
Top