0

I have developed a program for windows with visual basic 6 for printing orders in a pizzeria, I display a window and print it with "me.printform". Now I'm redoing it in vb.net, but the print quality is bad. I've read several solutions but it doesn't change. Anyone know how "printform" works in vb6 ?

I tried to save the image in a bitmap, print directly, but nothing to do, probably in vb6 the FORM.PRINTFORM method has some setting that I don't know...

Elviss
  • 1
  • Please show the VB code, because I do not know why you need an image for printing a form – Luuk Apr 02 '23 at 14:12
  • Or maybe even add a picture of an order for a "pizza Hawaï" ? – Luuk Apr 02 '23 at 14:14
  • BTW: Did you see the first result for: [searching: printform [vb6]](https://stackoverflow.com/search?q=printform+%5Bvb6%5D) ? It finds: [How to increase print quality with PrintForm in c#](https://stackoverflow.com/questions/16870107/how-to-increase-print-quality-with-printform-in-c-sharp), which is not a (direct) answer to your question, but show that you need to provide more info to this problem. (Please show the VB6 code, as a [mre]) – Luuk Apr 02 '23 at 14:24
  • now I look, I know the problem is the resolution difference between screen and printer, in vb6 I didn't have this problem – Elviss Apr 02 '23 at 14:29
  • OK, now you will have to find out where this problem is coming from, because resolution of picture showed on screen is not changed (by itself) since VB6. (AFAIK) – Luuk Apr 02 '23 at 14:34
  • in vb6 the command line is : "me.prinform" the form is composed of a series of labels with the data to be printed, simply. – Elviss Apr 02 '23 at 14:38
  • in vb.net: Me.DrawToBitmap(bmp, New Rectangle(fromLeft, fromTop, mWidth, mHeight)) an i use printdocument.. – Elviss Apr 02 '23 at 14:43
  • [Using .DrawToBitmap - how to change resolution of image?](https://stackoverflow.com/questions/13193212/using-drawtobitmap-how-to-change-resolution-of-image) ?? – Luuk Apr 02 '23 at 14:44
  • Exactly! Same pc, same printer...probably there's some setting, you should exactly replicate vb6's Printform method – Elviss Apr 02 '23 at 14:51
  • I tried changing image resolution, printer resolution, size of the area to be printed....nothing – Elviss Apr 02 '23 at 14:53
  • the print quality does not always change the same and bad – Elviss Apr 02 '23 at 14:55

0 Answers0