// Handler for PrintPageEvents public: static System::Void PrintPage(Object^ sender, PrintPageEventArgs^ e){ Metafile^ pageMetaFile = gcnew Metafile(pageToPrint); System::Drawing::Rectangle^ adjustedRect = gcnew Rectangle(e->PageBounds.Left - Convert::ToInt32(e->PageSettings->HardMarginX), e->PageBounds.Top - Convert::ToInt32(e->PageSettings->HardMarginY), e->PageBounds.Width, e->PageBounds.Height); //Below line error like no instance of overloaded function System::Drawing::Graphics::Fillrectangle matches the arguement list & arguement type System::Drawing::Brush, System::Drawing::Rectangle and the Object type is System::drawing::Graphics ???????????? e->Graphics->FillRectangle(Brushes::White, adjustedRect);
e->graphics->FillRectangle(Brushes::White, e ->PageBounds.Left - Convert::ToInt32(e->PageSettings->HardMarginX), e->PageBounds.Top - Convert::ToInt32(e->PageSettings->HardMarginY), e->PageBounds.Width, e->PageBounds.Height);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)