.:: Fajar_ridikc identity | | about me Fajar_ridikc ::.

C# :: .NET TWAIN image scanner C#

0 :: comments

.NET TWAIN image scanner

Sample Screenshot

Abstract

In Windows imaging applications, the most used API for scanning is TWAIN www.twain.org. Unfortunately, the new .NET Framework has no built-in support for TWAIN. So we have to work with the interop methods of .NET to access this API. This article doesn't explain this interop techniques, and good knowledge of the TWAIN 1.9 specifications is assumed! The sample code included doesn't present a finished library, only some essential steps for a minimal TWAIN adaption to .NET applications.

Details

First step was to port the most important parts of TWAIN.H, these are found in TwainDefs.cs. The real logic for calling TWAIN is coded in the class Twain, in file TwainLib.cs.. As the TWAIN API is exposed by the Windows DLL,twain_32.dll, we have to use the .NET DllImport mechanism for interop with legacy code. This DLL has the central DSM_Entry(), ordinal #1 function exported as the entry point to TWAIN. This call has numerous parameters, and the last one is of variable type! It was found to be best if we declare multiple variants of the call like:
[DllImport("twain_32.dll", EntryPoint="#1")]
private static extern TwRC DSMparent(
    [In, Out] TwIdentity origin,
    IntPtr zeroptr,
    TwDG dg, TwDAT dat, TwMSG msg,
    ref IntPtr refptr );
The Twain class has a simple 5-step interface:
class Twain
{
    Init();
    Select();
    Acquire();
    PassMessage();
    TransferPictures();
}
For some sort of 'callbacks', TWAIN uses special Windows messages, and these must be caught from the application-message-loop. In .NET, the only way found was IMessageFilter.PreFilterMessage(), and this filter has to be activated with a call like Application.AddMessageFilter(). Within the filter method, we have to forward each message to Twain.PassMessage(), and we get a hint (enum TwainCommand) back for how we have to react.

Sample App

The sample is a Windows Forms MDI-style application. It has the two TWAIN-related menu items Select Source...and Acquire... Once an image is scanned in, we can save it to a file in any of the GDI+ supported file formats (BMP, GIF, TIFF, JPEG...)

Limitations

All code was only tested on Windows 2000SP2, with an Epson Perfection USB scanner and an Olympus digital photo camera. The scanned picture is (by TWAIN spec) a Windows DIB, and the sample code has VERY little checking against error return codes and bitmap formats. Unfortunately, no direct method is available in .NET to convert a DIB to the managed Bitmap class... Some known problems may show up with color palettes and menus.
Note, TWAIN has it's root in 16-Bit Windows! For a more modern API supported on Windows ME/XP, have a look at Windows Image Acquisition (WIA).

License

This article, along with any associated source code and files, is licensed under A Public Domain dedication
Suni

VB.NET :: code printer scanner vb.net

0 :: comments

Printer Listing (vb.net)

With reference to this site.

You need to add reference for 'System.Management' in order to use the namespace 'System.Management'.

Imports System.Management

Public Class Form1

   Private moc As System.Management.ManagementObjectCollection

   Private Sub LoadPrinters()

       Dim oquery As System.Management.ObjectQuery = _
        New System.Management.ObjectQuery("SELECT * FROM Win32_Printer")

        Dim mosearcher As System.Management.ManagementObjectSearcher = _
        New System.Management.ManagementObjectSearcher(oquery)

        moc = mosearcher.Get()

        For Each tPrinter As ManagementObject In moc

            cmbPrinters.Items.Add(tPrinter("DeviceID"))

        Next tPrinter

    End Sub

End Class


Download the sample code in VB.NET (Visual Studio 2008 SP1)
Suni

VB.NET :: membuat scanner dengan VB.Net

0 :: comments



Notice that:
1- The code is provided as it is, there is no support to it. There is no grantee that it will work without errors.
2- You may use the code in any way you like, however you don't own it, this software is totally free for everyone to use..
3- By downloading the file you agree to the above.

Finally if you could improve the code, you are welcome to send me updates explaining what have you done, so that I could publish that and everyone make use of it.
Suni

VB.NET :: APLIKASI RENTAL MOBIL DENGAN VB.NET

0 :: comments

APLIKASI RENTAL MOBIL DENGAN VB.NET

APLIKASI RENTAL MOBIL



















Aplikasi Rental Mobil ini dibuat menggunakan :
- Visual Studio 2005 / VB.Net 2005
- Dengan database MS.Access
- Cristal Report 8.5

Feature - Feature yang diberikan oleh aplikasi ini adalah :
- Menu Login
- Menu Utama
- Menu Master Supir
- Menu Master Petugas
- Menu Master Pelanggan
- Menu Master Mobil
- Menu Transaksi Peminjaman
- Menu transaksi Pengembalian

Utility yang diberikan :
- Menu Manual Book
- Menu Log Off dan exit
- Menu ganti Password
- Menu Backup Database

Laporan - Laporan yang diberikan :
--laporan Data Master
- Master Supir
- Master Petugas
- Master Pelanggan
- Master Mobil

--Laporan Peminjaman
- berdasarkan harian
- berdasarkan mingguan
- berdasarkan bulanan/Tahunan


--Laporan Pengembalian
- berdasarkan harian
- berdasarkan mingguan
- berdasarkan bulanan/Tahunan

(*Jika Dalam Peminjaman Mobil telat dari Waktu yang ditentukan maka peminjam akan dikenakan Denda)
Suni

VB6.0 :: SOURCE CODE APLIKASI ANTRIAN BANK VB 6.0

0 :: comments

SOURCE CODE APLIKASI ANTRIAN BANK VB 6.0

Source Code Aplikasi Antrian Bank Vb 6.0 - Sistem manajemen antrian merupakan aplikasi antrian yang diintegrasikan dengan media pendukung seperti PC Komputer, display loket, printer thermal, TV LCD/LED/Plasma sehingga dapat mengatur dan mengelola  permasalahan dalam antrian guna menunjang pelayanan yang memuaskan. Mesin Antrian berfungsi sebagai alat bantu untuk mengatur  antrian model sebagai contoh; antrian bankantrian apotekantrian poliklinikantrian kasirdsb. Contoh program antrian bank dapat diilustrasikan sebagai berikut: Lihat DISINI.

APLIKASI ANTRIAN BANK VB 6.0
Arsitektur Antrian Bank -Relainc Andro-
sistem-antrian :
  1. Customer datang mengambil tiket antrian pada kiosk layar sentuh, dengan menyentuh menu pada kios touchscreen, misal : CS atau Teller, maka tiket antrian akan tercetak melalui printer thermal.
  2. Customer menunggu di ruang tunggu yang telah disediakan, sambil menunggu customer bisa menikmati fasilitas yang disediakan seperti, tempat charger HP, dispenser, majalah, koran, TV Multimedia yang integrasi dengan panel antrian. Customer nyaman dalam menunggu dan mengurangi rasa bosan menunggu.
  3. Jika operator di Teller/CS selesai pelayanannya bisa segera memanggil nomor antrian berikutnya dengan tombol pemanggil atau software caller.
  4. Nomor antrian akan dipanggil otomatis melalui speaker aktif, dan ditampilkan di display loket dan TV LCD.
  5. Customer menuju counter layanan yang dipanggil tadi  (CS/Teller).
  6. Setelah selesai CS/Teller melayani, petugas dapat meminta partisipasi customer untuk memberikan penilaian terhadap kepuasan pelayanan tadi dengan alat surveykepuasan pelanggan.
  7. Customer pulang dengan perasaan puas dan senang.
Model antrian ada beberapa type, mana yang cocok dengan kebutuhan antrian Anda dapat disesuaikan dengan kebutuhan. metode antrian rata-rata menggunakan antrian sederhana, jadi customer yang pertama datang, maka dia yang pertama dilayani.
Semoga artikel menngenai Source Code Aplikasi Antrian Bank Vb 6.0 bisa bermanfaat untuk teman teman semua. Terima Kasih.

Jika Ingin Mendownload Source Code Bisa Download di Bawah Sini :

Suni

VB.NET :: APLIKASI PENJUALAN DAN PEMBELIAN SERVICE MOBIL & MOTOR (VB.NET)

0 :: comments

APLIKASI PENJUALAN DAN PEMBELIAN SERVICE MOBIL & MOTOR (VB.NET)

Aplikasi Penjualan dan Pembelian Service Mobil & Motor

Login ke database


































Penjualan dan Pembelian Service Mobil dan Motor
Spesifikasi :
Menggunakan Visual Studio
Menggunakan Database MYSQL
Menggunakan Crystal Report 8.5
Suni