Skip to content

Visual: Basic Projects With Source Code

Imports System.IO Public Class TodoApp Private tasksFile As String = "tasks.txt"

Private Sub MakeMove(row As Integer, col As Integer, player As String) board(row, col) = player Dim btn As Button = GetButton(row, col) btn.Text = player btn.Enabled = False visual basic projects with source code

Private Sub btnAdd_Click(sender As Object, e As EventArgs) Handles btnAdd.Click If txtTask.Text.Trim() <> "" Then lstTasks.Items.Add(txtTask.Text) txtTask.Clear() SaveTasks() End If End Sub Imports System

If emptyCells.Count > 0 Then Dim rnd As New Random() Dim move = emptyCells(rnd.Next(emptyCells.Count)) MakeMove(move.Item1, move.Item2, "O") End If End Sub col As Integer

Private Sub Operator_Click(sender As Object, e As EventArgs) Handles btnAdd.Click, btnSub.Click, btnMul.Click, btnDiv.Click If currentInput <> "" Then firstNumber = Double.Parse(currentInput) operation = CType(sender, Button).Text currentInput = "" End If End Sub

Private Sub LoadData() Dim adapter As New SQLiteDataAdapter("SELECT * FROM Students", conn) Dim table As New DataTable() adapter.Fill(table) DataGridView1.DataSource = table End Sub