| CurrentX, CurrentY |
| |
| |
| Private Sub Main() | Programmablauf ohne Formular. |
| Print_Me | Modul starten |
| End Sub | |
| Printer.Print "" sowie Tab(x) können hier wirkungslos |
| Sub Print_Me() | bleiben; die Zeilen-Abstände werden durch die Koordinaten |
| Printer.FontSize = 12: Printer.FontBold = True | bestimmt. |
| Koordinaten in "Twips": |
| Printer.CurrentX = 1200: Printer.CurrentY = 500 | Abstand vom linken Rand + Abstand von oben. |
| Printer.Print "Persönliche Daten" | Überschrift. |
| Printer.FontBold = False | |
| |
| Printer.FontSize = 8 | Überschrift klein. |
| Printer.CurrentX = 500: Printer.CurrentY = 1000 | |
| Printer.Print "Name:" | |
| Printer.CurrentX = 3000: Printer.CurrentY = 1000 | |
| Printer.Print "Vorname:" | |
| |
| Printer.FontSize = 12 | Daten GROSS. |
| Printer.CurrentX = 500: Printer.CurrentY = 1300 | |
| Printer.Print "George" | |
| Printer.CurrentX = 3000: Printer.CurrentY = 1300 | |
| Printer.Print "Lucas" | |
| |
| Printer.FontSize = 8 | Daten klein. |
| Printer.CurrentX = 500: Printer.CurrentY = 1900 | |
| Printer.Print "Straße:" | |
| Printer.CurrentX = 4500: Printer.CurrentY = 1900 | |
| Printer.Print "Ort:" | |
| |
| Printer.FontSize = 12 | Daten GROSS. |
| Printer.CurrentX = 500: Printer.CurrentY = 2300 | |
| Printer.Print "Hauptstr. " | |
| Printer.CurrentX = 4500: Printer.CurrentY = 2300 | |
| Printer.Print "Hamburg" | |
| |
| Printer.FontSize = 18 | Hausnummer GRÖSSER. |
| Printer.CurrentX = 1900: Printer.CurrentY = 2180 | |
| Printer.Print "256" | |
| |
| Printer.FontSize = 24 | Postleitzahl AM GRÖSSTEN. |
| Printer.CurrentX = 3000: Printer.CurrentY = 2090 | |
| Printer.Print "20301" | |
| |
| Printer.FontSize = 8 | ...und wieder Daten klein. |
| Printer.CurrentX = 3000: Printer.CurrentY = 1900 | |
| Printer.Print "PLZ:" | Diese Zeile steht zwar am Ende des Programms, wird |
| End | aber auf dem Papier viel früher ausgegeben. |
| End Sub | |
| |
| | |
| |
| |
| Private Sub Form_Load() | Andere Variante: ohne CurrentY |
| Komma am Zeilenende, dann muß die nächste Anweisung in der nächsten Zeile stehen. |
| Ohne das Komma würde die nächste Anweisung auf eine neue Zeile gedruckt. |
| |
| Printer.FontSize = 8 | Überschrift klein |
| Printer.CurrentX = 1000: Printer.Print "Name:", | Gleich hinter dem Komma weiterschreiben funktioniert nicht. |
| Printer.CurrentX = 5000: Printer.Print "Vorname" | |
| |
| Printer.FontSize = 12 | Daten GROSS |
| Printer.CurrentX = 1000: Printer.Print "Mustername", | |
| Printer.CurrentX = 5000: Printer.Print "Mustervorname" | |
| |
| Printer.Print "" | |
| |
| Printer.FontSize = 6 | Überschrift sehr klein |
| Printer.CurrentX = 1000: Printer.Print "Straße:", | |
| Printer.CurrentX = 5000: Printer.Print "Ort" | |
| |
| Printer.FontSize = 20 | Daten SEHR GROSS |
| Printer.CurrentX = 1000: Printer.Print "Teststr.2", | |
| Printer.CurrentX = 5000: Printer.Print "Hamburg" | |
| Innerhalb der Zeile lassen sich Schriftart, Schriftgröße, fett, kursiv, unterstrichen etc. einstellen. |
| Printer.FontSize = 8: Printer.CurrentX = 1000: Printer.Print "Name:", |
| Printer.FontSize = 10: Printer.CurrentX = 5000: Printer.Print "Vorname" |
| |
| Printer.FontSize = 10: Printer.CurrentX = 1000: Printer.Print "Mustername", |
| Printer.FontSize = 24: Printer.CurrentX = 5000: Printer.Print "Mustervorname" |
| Mit Komma oder Semikolon kann man auch in eine Zeile schreiben; es muß zusätzlich ein Doppelpunkt gesetzt werden. |
| Printer.CurrentX = 1000: Printer.Print "Name";: Printer.CurrentX = 5000: Printer.Print "Vorname" |
| End | |
| End Sub | |
| |