Jump to content

Visual Basic PrintForm Alternative

CripDawg

would there be a way to make just a regular form that does the same as the PrintForm but i change the GUI because i really dislike the look of the PrintForm it doesn't suit the rest of my project and i would also like to add some extra buttons

Link to comment
Share on other sites

Link to post
Share on other sites

I dropped winforms all together. Now use Qt. And customizability with Winforms isn't something that you can change easily. 

"Instinct or Rationality; Which will you choose? Enchanted by a superiority complex"

"what you do in spite of internet speed is inspiring. :3" From Cae - 2015

Link to comment
Share on other sites

Link to post
Share on other sites

Is it the print preview window you don't want? You aren't being clear what form you dislike which is why I asked you for a screenshot.

 

If so, the article An Enhanced PrintPreviewDialog should help you create a custom print preview screen.

 

A possible alternative could be to change the PrintAction property so you skip the print preview screen entirely.

PrintForm1.PrintAction = PrintToPreview // default choice// other optionsPrintForm1.PrintAction = PrintToPrinterPrintForm1.PrintAction = PrintToFile

 I'm not sure if this will require you to configuring anything manually but it might work.

Link to comment
Share on other sites

Link to post
Share on other sites

Is it the print preview window you don't want? You aren't being clear what form you dislike which is why I asked you for a screenshot.

 

If so, the article An Enhanced PrintPreviewDialog should help you create a custom print preview screen.

 

A possible alternative could be to change the PrintAction property so you skip the print preview screen entirely.

PrintForm1.PrintAction = PrintToPreview // default choice// other optionsPrintForm1.PrintAction = PrintToPrinterPrintForm1.PrintAction = PrintToFile

 I'm not sure if this will require you to configuring anything manually but it might work.

yeah i use this its basically the same but that enhanced print preview looks heaps hard this is for my print button

 

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click        PrintForm1.PrintAction = Printing.PrintAction.PrintToPreview        PrintForm1.Print()
Link to comment
Share on other sites

Link to post
Share on other sites

 

yeah i use this its basically the same but that enhanced print preview looks heaps hard this is for my print button

 

Customizing WinForms usually is more complicated. You can choose to learn to do it, stick with the default preview look, or try the alternative I mentioned.

 

That alternative being: Have Button2_Click open a new form instead of printing. Design that form to your liking. Then have the new forms print button do

PrintForm1.PrintAction = Printing.PrintAction.PrintToPrinter // don't do a preview as your new form is your custom previewPrintForm1.Print()
Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×