Hari ini saya akan memberih contoh script cetak struk. . .
Contoh di bawah ini...
------------------------------------------------------------------------------------------------------------
Sub cetak()
Printer.Font = "Tahoma"
Printer.Show
Printer.CurrentX = 0
Printer.CurrentY = 0
Printer.FontSize = 9.5
Printer.Print Tab(6); "BIODATA";
Printer.Print Tab(6); "MAHASISWA BSI "; Format(Time, "hh:mm:ss AM/PM");
Printer.Print Tab(2); "===================================";
Printer.Print Tab(3); "NIM :"; TNim;
Printer.Print Tab(3); "NAMA :"; tNama;
Printer.Print Tab(3); "JURUSAN :"; tJurusan;
Printer.Print Tab(3); "SEMESTER :"; tSemester;
Printer.Print Tab(3); "ALAMAT :"; tAlmt;
Printer.Print Tab(2); "===================================";
Printer.FontSize = 9.5
Printer.Print Tab(2); "*Ini hanya sebuah contoh sederhana*";
Printer.Print Tab(2); "*yang dapat kalian kembangkan lagi*";
Printer.FontSize = 9.5
Printer.Print Tab(2); "===================================";
Printer.Font = "Tahoma"
Printer.Print Tab(2); "===================================";
-----------------------------------------------------------------
-----------------------------------------------------------------
Private Sub Form_Load()
Call cetak
end sub
-----------------------------------------------------------------
Contoh di bawah ini...
------------------------------------------------------------------------------------------------------------
Sub cetak()
Printer.Font = "Tahoma"
Printer.Show
Printer.CurrentX = 0
Printer.CurrentY = 0
Printer.FontSize = 9.5
Printer.Print Tab(6); "BIODATA";
Printer.Print Tab(6); "MAHASISWA BSI "; Format(Time, "hh:mm:ss AM/PM");
Printer.Print Tab(2); "===================================";
Printer.Print Tab(3); "NIM :"; TNim;
Printer.Print Tab(3); "NAMA :"; tNama;
Printer.Print Tab(3); "JURUSAN :"; tJurusan;
Printer.Print Tab(3); "SEMESTER :"; tSemester;
Printer.Print Tab(3); "ALAMAT :"; tAlmt;
Printer.Print Tab(2); "===================================";
Printer.FontSize = 9.5
Printer.Print Tab(2); "*Ini hanya sebuah contoh sederhana*";
Printer.Print Tab(2); "*yang dapat kalian kembangkan lagi*";
Printer.FontSize = 9.5
Printer.Print Tab(2); "===================================";
Printer.Font = "Tahoma"
Printer.Print Tab(2); "===================================";
-----------------------------------------------------------------
-----------------------------------------------------------------
Private Sub Form_Load()
Call cetak
end sub
-----------------------------------------------------------------
0 komentar:
Posting Komentar