Skip to main content

Posts

To develop simple window Application with database "School.mdb" and "student" table in the school.mdb database,student table with Roll no, Name and Address Field

// We will change name to s_name  using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.OleDb; namespace _2012 {     public partial class Form1 : Form     {      //   OleDbCommand cmd;         OleDbConnection con;       //  OleDbDataReader dr;         OleDbDataAdapter da;         OleDbCommandBuilder builder;         DataSet ds;         string query = "";         int max = 0,min=0;         public Form1()         {             InitializeComponent();             con = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Sourc...

to develop simple window application with database "customer.mdb" and "cust" table with customer name,address,town,country,postal code.

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.OleDb; namespace _2013 {     public partial class Form1 : Form     {         OleDbCommand cmd;         OleDbConnection con;               string query = "";         int f = 1;         public Form1()         {             InitializeComponent();         }         private void Form1_Load(object sender, EventArgs e)         {             con = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\anuj vb 10\2013\Customer.mdb");             label1.T...

How to connect to sql server to c# (.net ) using code

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data.SqlClient; namespace WindowsFormsApplication1 {     class query     {      public   SqlConnection con;         SqlCommand cmd;         public SqlDataReader sdr;         public query()         {             con = new SqlConnection("Data Source=LAB1PC7\\SQLEXPRESS;Initial Catalog=Test;Integrated Security=True");         }         public int modify(string s)         {             con.Open();             cmd = new SqlCommand(s, con);             int r = cmd.ExecuteNonQuery();             con.Close();           ...

Lunar Eclipse

LAST CHANCE TO SEE LUNAR ECLIPSE THIS YEAR FOR 80 MINUTES Source: 9gag.com

How to make a c sharp form that searches a text of your textbox on google in your default browser

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace WindowsFormsApplication2 {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }         private void button1_Click(object sender, EventArgs e)         {             System.Diagnostics.Process.Start("https://www.google.co.in/search?q="+textBox1.Text);         }     } }

Enhanced color palette in c # windows form with value limitter

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace WindowsFormsApplication1 {     public partial class Form1 : Form     {                 public Form1()         {             InitializeComponent();             int i = 0;             textBox1.Text = i.ToString();             textBox2.Text = i.ToString();             textBox3.Text = i.ToString();                     }         private void textBox1_TextChanged(object sender, EventArgs e)         {             try {   ...

Simple Color palette in c sharp windows forms

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace WindowsFormsApplication1 {     public partial class Form1 : Form     {                 public Form1()         {             InitializeComponent();             int i = 0;             textBox1.Text = i.ToString();             textBox2.Text = i.ToString();             textBox3.Text = i.ToString();                     }         private void textBox1_TextChanged(object sender, EventArgs e)         {             try {    ...