CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: printing a form

  1. #1
    Join Date
    Jun 2001
    Posts
    10

    printing a form

    hello sir...
    i want to place a command button on the form which will print that page.....i tried it ..using common dialog box......what i need is it has to ask for type of printer and no. of pages and the size of the page and all other printer options...
    what will be the code shall i write on onclick() event of command button.
    thank u in advance....




  2. #2
    Join Date
    Nov 2000
    Location
    Israel
    Posts
    72

    Re: printing a form

    hi.
    sorry, i didn't understand what do you want to do exactly. if you want to print the form as is you can us MyForm.PrintForm

    if not, you can us the printer collection in order to set the printer you want to print to.

    hope i helped you. if not, just asked again - more specific what you are looking for.

    Smile, Shmulik. (-;

  3. #3
    Join Date
    Jun 2001
    Location
    Memphis, TN
    Posts
    146

    Re: printing a form

    Try some of this...

    Command1_click()

    Command1.visible = false 'you don't want to print the print button do you?
    CommonDialog1.ShowPrint 'you might wanna check my syntax there to be sure, i don't typically use this
    MyForm.PrintForm 'print the form
    Command1.visible = true 'show me the button!

    End Sub




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