03. september 2001 - 08:23Der er
16 kommentarer og 1 løsning
Hjælp til printfunktion
Hej! Jeg har et problem med at få mit program til at lave linjeskift når jeg skal printe ud! Det printer bare uden for papiret!! Hvad gør jeg?? Min printkode ser således ud, lidt langsom, men den virker!!
c.aa.t In the other question you say: I keep getting errors! Private Sub cmdprint_Click() is highlighted
This indicates that something is wrong in your code. You can comment out all lines and then one line at a time remove the comment. This way you should be able to locate what is wrong.
Jeg går ud fra at det er i bredden at der printes udenfor, ikke i højden. Du må jo begrænse længden af hvad det er muligt at indtaste i alle de tekstfelter. I øvrigt kan man få pæne kolonner med anvendelse af \"tab\".
printer.print \"Ledetekst\";tab(12;mitfelt.text
Hvis du har tekster, der er så lange at de skal bruge flere linier, bliver det indviklet, men muligt.
Du skal i så fald dele linien f.eks. ved den sidste ascii(20) før tegn nr. 80.
Try re-naming LineFormat to MyLineFormat. You have to do this in your cmdPrint_Click and also in the module. Then try compiling the program to an EXE file.
In your project you have forms and also modules. You can add pieces of code to a module which can then be used from all forms for example. You should find a module with th ename module1. In this module there is a function called LineFormat which you should try to rename to MyLineFormat.
are you sure you are looking at what I sent. I have just checked my sent mail and its there!
If you look in the ZIP file there is a file named module1.bas. The function is in this. I would suggest that you copy all the files to a new folder and then start by clicking on the .vbp file. Or when you extract the files from the zip file it must overwrite the existing files or the project will not know that the .bas file is in the project.
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.