CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 1999
    Posts
    6

    Printing to Forms

    I am printing to a blank form and using it as a basic form of Print Preview. However, if a window is opened over the form then the print under the window disappears when the window is closed. Can anyone tell me why this is happening and how to stop it. Also if anyone knows of a more robust method of creating a print preview I would be very grateful

    Many thanks

    Charlie


  2. #2
    Join Date
    Aug 1999
    Posts
    7

    Re: Printing to Forms

    Your preview window needs to be redraw when a window above is closed.
    You can put your preview code(those code which output to the preview window)into the Form_Paint eventhandling subrouting.
    You can also set the AutoRedraw property of the preview window to true to accomplish this task.


  3. #3
    Join Date
    Jun 1999
    Posts
    6

    Re: Printing to Forms

    Many Thanks
    I can't believe I managed to miss the AutoRedraw property.
    I guess that's what comes of not bothering to learn properly and taking shortcuts

    Cheers Charlie


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured