Visual Basic Projects With Source Code -

Private Sub btnAdd_Click(sender As Object, e As EventArgs) Handles btnAdd.Click Dim cmd As New SQLiteCommand("INSERT INTO Students (Name, Grade) VALUES (@name, @grade)", conn) cmd.Parameters.AddWithValue("@name", txtName.Text) cmd.Parameters.AddWithValue("@grade", CInt(txtGrade.Text)) cmd.ExecuteNonQuery() LoadData() CalculateAverage() End Sub

Private Function CheckWin(player As String) As Boolean ' Check rows, columns, diagonals For i = 0 To 2 If board(i, 0) = player AndAlso board(i, 1) = player AndAlso board(i, 2) = player Then Return True If board(0, i) = player AndAlso board(1, i) = player AndAlso board(2, i) = player Then Return True Next If board(0, 0) = player AndAlso board(1, 1) = player AndAlso board(2, 2) = player Then Return True If board(0, 2) = player AndAlso board(1, 1) = player AndAlso board(2, 0) = player Then Return True Return False End Function

Visual Basic (VB.NET) often gets a bad rap as a "beginner's toy," but don't let the critics fool you. In the enterprise world, VB.NET is a fully supported, object-oriented language that runs on the powerful .NET framework. It is incredibly efficient for building Windows desktop applications (WinForms), automating Excel, and even creating web apps. visual basic projects with source code

Let me know in the comments which project you plan to build first, or share your own VB project ideas below! Happy coding! 🚀

If board(row, col) = "" AndAlso gameActive AndAlso currentPlayer = "X" Then MakeMove(row, col, "X") If gameActive Then currentPlayer = "O" lblStatus.Text = "Computer's turn..." ComputerMove() currentPlayer = "X" End If End If End Sub Private Sub btnAdd_Click(sender As Object, e As EventArgs)

Imports System.IO Public Class ImageViewer Private imageFiles As String() = Nothing Private currentIndex As Integer = 0

Public Class Calculator Dim currentInput As String = "" Dim firstNumber As Double = 0 Dim operation As String = "" Private Sub Number_Click(sender As Object, e As EventArgs) Handles Button1.Click, Button2.Click, '... etc Dim btn As Button = CType(sender, Button) currentInput &= btn.Text txtDisplay.Text = currentInput End Sub Let me know in the comments which project

Private Sub ShowImage() If imageFiles IsNot Nothing AndAlso imageFiles.Length > 0 Then picImage.Image = Image.FromFile(imageFiles(currentIndex)) Me.Text = $"Image Viewer - {Path.GetFileName(imageFiles(currentIndex))}" End If End Sub