How to Create a Proyek Transaksi Hp Vb Net Application in Visual Basic
Proyek Transaksi Hp Vb Net is a project that allows you to manage transactions of mobile phones using Visual Basic. In this tutorial, you will learn how to create a simple Proyek Transaksi Hp Vb Net application that can add, edit, delete and search data from a database.
To follow this tutorial, you will need:
Visual Studio 2019 or later with Visual Basic support
Microsoft Access 2016 or later
A database named proyek_hp.accdb with a table named tbl_hp that has the following fields: id (AutoNumber), merk (Text), tipe (Text), warna (Text), harga (Currency), and stok (Number)
A folder named images that contains images of the mobile phones with the file names matching the tipe field values
Steps to Create the Proyek Transaksi Hp Vb Net Application
The steps to create the Proyek Transaksi Hp Vb Net application are as follows:
Create a new Windows Forms App (.NET Framework) project in Visual Studio and name it ProyekTransaksiHpVbNet.
Add a reference to the Microsoft Access Database Engine 2016 Redistributable by going to Project > Add Reference > COM > Microsoft Office 16.0 Access Database Engine Object Library and clicking OK.
Add a module named Module1.vb to the project and declare a global variable named conn of type OleDbConnection. Also, write a subroutine named Koneksi() that will open the connection to the database using the following code:
Public conn As OleDbConnection
conn = New OleDbConnection(\"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=proyek_hp.accdb\")
If conn.State = ConnectionState.Closed Then
Add a form named FrmMenu.vb to the project and design it as shown below:
The form should have the following controls and properties: