Programming for Everybody: 2026

Code Source.cpp for Visual Studio2026 C++

 #include <windows.h>

#include "MyForm.h"

using namespace System;
using namespace System::Windows::Forms;

[STAThread]
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);

Project1::MyForm form;
Application::Run(% form);

return 0;
}

Connect VB.NET to Local SQL Database in Visual Studio 2026 (With Source Code)



Imports System.Data.SqlClient
Public Class Form1
Dim conn2 As New SqlConnection("Data Source=(localdb)\MSSQLLocalDB;initial catalog=database2;Integrated Security=True")
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim conn As New SqlConnection("Data Source=(localdb)\MSSQLLocalDB;Integrated Security=True")
Dim strsql As String = "If Not Exists(Select name from sys.databases Where name='database2')" &
" begin create database database2 select 1 end" &
" else begin select 0 end"
Dim cmd As New SqlCommand(strsql, conn)
conn.Open()
Dim result As Integer = Convert.ToInt32(cmd.ExecuteScalar())
If result = 1 Then
MessageBox.Show("Database created Successfully")
Else
MessageBox.Show("Database already exists")
End If
conn.Close()
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim strsql As String = "If Not Exists(Select name From sys.tables Where name='students') " &
"begin create table students(id int primary key identity(1,1)," &
"name1 varchar(50) Not Null," &
"phone varchar(50) Not Null," &
"date1 date Not Null) Select 1 end " &
" else begin select 0 end"
Dim cmd As New SqlCommand(strsql, conn2)
conn2.Open()
Dim result As Integer = Convert.ToInt32(cmd.ExecuteScalar())
If result = 1 Then
MessageBox.Show("Table created Successfully")
Else
MessageBox.Show("Table already exists")
End If
conn2.Close()

End Sub

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
load_data()
End Sub
Private Sub load_data()
conn2.Open()
Dim da As New SqlDataAdapter("Select * From students", conn2)
Dim dt As New DataTable
da.Fill(dt)
DataGridView1.DataSource = dt
conn2.Close()
End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
TextBox1.Text = ""
TextBox2.Text = ""
DateTimePicker1.Value = Now()
Button4.Enabled = True
End Sub

Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
Dim cmd As New SqlCommand("Insert Into students(name1,phone,date1)Values(@name1,@phone,@date1)", conn2)
cmd.Parameters.AddWithValue("name1", TextBox1.Text.Trim)
cmd.Parameters.AddWithValue("phone", TextBox2.Text.Trim)
cmd.Parameters.AddWithValue("date1", DateTimePicker1.Value.ToString)
conn2.Open()
cmd.ExecuteNonQuery()
conn2.Close()
Button4.Enabled = False
load_data()
End Sub 

End Class 

How to sum numbers easily in Microsoft #Word 2026

 


Learn how to sum numbers easily in Microsoft Word 2026 without using Excel! 💡

In this quick tutorial, you'll discover a simple trick to calculate totals directly inside Word documents. Perfect for beginners and anyone who wants to save time and boost productivity.

📌 What you’ll learn: * How to insert formulas in Word * How to quickly calculate totals * Tips to work smarter inside Microsoft Word 🚀 Don’t forget to like, share, and subscribe for more useful tech tips!
#programming_for_everybody
#programming_for_everybody_word
#MicrosoftWord #WordTips #Productivity #TechTutorial #ExcelTricks

SQLite Tutorial for Beginners: Delete All Rows and Reset Auto-Increment

 


Many developers wonder how to remove all records from a table in SQLite and start the ID counter again from 1. In this video, we explain the correct method using SQL commands in a simple and practical way. In this lesson you will learn: • How to delete all rows from a SQLite table • The difference between DELETE and TRUNCATE • Why TRUNCATE does not exist in SQLite • How to reset the Auto-Increment counter • How the sqlite_sequence table works internally This tutorial is perfect for beginners who are learning SQL databases and want to understand how SQLite manages primary keys and auto-increment values. SQL Commands used in the video: DELETE FROM table_name; DELETE FROM sqlite_sequence WHERE name='table_name'; If you want to master SQLite and database programming, don't forget to subscribe to the channel and turn on notifications for more tutorials. #programmingforeverybody #SQLite #SQLTutorial #Database #Programming #LearnSQL

search button in userform Excel and display all data in one label With Source Code



 Source Code:

Private Sub CommandButton1_Click()

If TextBox1.Text = "" Then

MsgBox "Please Enter ID"

Exit Sub

End If

Dim ws As Worksheet

Set ws = ThisWorkbook.Sheets("Sheet6")

Dim i As Integer

For i = 1 To ws.UsedRange.Rows.Count

If TextBox1.Text = ws.Cells(i, 1).Value Then

Label2.Caption = "First name: " & ws.Cells(i, 2).Value & vbCrLf & "" _

& "Last name: " & ws.Cells(i, 3).Value & vbCrLf & "" _

& "Marks: " & ws.Cells(i, 4).Value

Exit Sub

Else

Label2.Caption = "No data found"

End If

Next i

End Sub



Microsoft Access Form: update button in access form VBA With Code


Full Code:
Option Compare Database

Private Sub Combo0_Click()
Me.id_txt = Me.Combo0.Column(0)
Me.name_txt = Me.Combo0.Column(1)
Me.grade1 = Me.Combo0.Column(2)
Me.marks_txt = Me.Combo0.Column(3)
Me.status1 = Me.Combo0.Column(4)
End Sub

Private Sub Command14_Click()
Dim gradesql As String
If Me.grade1.ListIndex = -1 Then
gradesql = ""
Else
gradesql = "id_grade = " & Me.grade1.Column(0) & ", "
End If
CurrentDb.Execute "Update marks_students2 Set " & _
"student_name = '" & Me.name_txt & "', " & _
gradesql & _
"marks = " & Me.marks_txt & ", " & _
"status1 = '" & Me.status1.Value & "' " & _
" Where id = " & Me.id_txt
MsgBox "Data Updated Successfull"
End Sub

Show and hide password in column datagridview in C#

🔍 Searching and selecting records efficiently inside an Excel VBA UserForm can significantly improve user experience.

🎯 In this tutorial, I demonstrate how to implement a dynamic search feature using a TextBox and display filtered results in a ListBox. Selecting a row automatically populates the UserForm fields with the corresponding data, making data editing and navigation faster and more reliable.

📺 Full tutorial on YouTube:

#Microsoft #ExcelVBA #VBA #UserForm #Automation #TechCommunity