Author Archive

reading csv   Leave a comment


using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Text;

using System.Data;

using System.IO;

using System.Data.OleDb;

using System.Globalization;

using System.Text.RegularExpressions;

using System.Collections;

 

namespace hashtable

{

class Program1

{

static void Main(string[] args)

{

clsValidateEmails objclsValidateEmails = new clsValidateEmails();

objclsValidateEmails.ValidateEmails();

}

}

 

public class clsValidateEmails

{

Hashtable htEmail = new Hashtable();

public void ValidateEmails()

{

DataTable dtCSV = GetDataTableFromCsv(@”G:\live\xls\hashtable\hashtable\foo.txt”, true);

int nCount = Load_DictionaryTable_LINQ(dtCSV);

if (nCount > 0)

{

//Loop through hash table to check working email ids

}

}

 

 

private int Load_DictionaryTable_LINQ(DataTable dt)

{

Regex regex = new Regex(@”^[A-Za-z](([_\.\-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z]{2,})$”);

var count = (from dr in dt.AsEnumerable()

.Where(dr => regex.IsMatch(dr[“EmailId”].ToString()) == true)

select new

{

a = updateHashTable(dr.Field<Int32>(“SlNo”), dr.Field<String>(“EmailId”))

}).Count();

return (int)count;

}

 

public int updateHashTable(int key, string value)

{

if (htEmail.ContainsKey(key))

{

htEmail[key] = value;

}

else

{

htEmail.Add(key, value);

}

return 1;

}

 

 

private DataTable GetDataTableFromCsv(string path, bool isFirstRowHeader)

{

string header = isFirstRowHeader ? “Yes” : “No”;

 

string pathOnly = Path.GetDirectoryName(path);

string fileName = Path.GetFileName(path);

 

string sql = @”SELECT * FROM [” + fileName + “]”;

 

using (OleDbConnection connection = new OleDbConnection(

@”Provider=Microsoft.Jet.OLEDB.4.0;Data Source=” + pathOnly +

“;Extended Properties=\”Text;HDR=” + header + “\””))

using (OleDbCommand command = new OleDbCommand(sql, connection))

using (OleDbDataAdapter adapter = new OleDbDataAdapter(command))

{

DataTable dataTable = new DataTable();

dataTable.Locale = CultureInfo.CurrentCulture;

adapter.Fill(dataTable);

return dataTable;

}

}

}

}

 

 

Posted April 17, 2014 by PrashanthChindam in Uncategorized

Reading, manipulating an Xml file using C#.Net(including images)   Leave a comment


Objective:

To develop a windows application to read an xml file; perform insert, search, update, delete operations,navigation of records and display respective images.

Design:

Design the form as above with 1 DataGridView, 1 PictureBox control, 2 OpenFileDialog controls, 4 Labels, 4 TextBoxes and 12 Buttons.

->PictureBox1 Properties:

BorderStyle=Fixed3D; SizeMode=StrechImage

Code:

using System;

using System.Data;

using System.Drawing;

using System.Windows.Forms;

using Microsoft.VisualBasic;

using System.IO;

namespace xmlapp

{

public partial class studdata : Form

{

public studdata()

{

InitializeComponent();

}

DataSet ds; string fpath, fdir, ppath, pname, pdestin; int rno = 0; DataRow drow;

private void loadbtn_Click(object sender, EventArgs e)

{

try

{

openFileDialog1.Filter = “xml|*.xml|all files|*.*”;

DialogResult res = openFileDialog1.ShowDialog();

if (res == DialogResult.OK)

{

dataGridView1.DataSource = null;

clearbtn.PerformClick();

fpath = openFileDialog1.FileName;

ds = new DataSet();

ds.ReadXml(fpath);

//setting primary key inorder to search a record using finding method

ds.Tables[0].Constraints.Add(“pk_sno”, ds.Tables[0].Columns[0], true);

dataGridView1.DataSource = ds.Tables[0];

fdir = fpath.Substring(0, fpath.LastIndexOf(“\\”) + 1);

showdata();

}

}

catch

{ MessageBox.Show(“invalid input”);  }

}

void showdata()

{

if (ds.Tables[0].Rows.Count > 0)

{

pictureBox1.Image = null;

sno_txtbx.Text = ds.Tables[0].Rows[rno][0].ToString();

sname_txtbx.Text = ds.Tables[0].Rows[rno][1].ToString();

course_txtbx.Text = ds.Tables[0].Rows[rno][2].ToString();

fee_txtbx.Text = ds.Tables[0].Rows[rno][3].ToString();

pictureBox1.ImageLocation = fdir + ds.Tables[0].Rows[rno][4].ToString();

}

else

MessageBox.Show(“No records”);

}

private void browsebtn_Click(object sender, EventArgs e)

{

openFileDialog2.InitialDirectory = fdir;

openFileDialog2.Filter = “bmp,jpeg,png|*.bmp;*.jpg;*.png|all files|*.*”;

DialogResult res = openFileDialog2.ShowDialog();

if (res == DialogResult.OK)

{

pictureBox1.ImageLocation = openFileDialog2.FileName;

}

}

private void insertbtn_Click(object sender, EventArgs e)

{

drow = null;

drow = ds.Tables[0].Rows.Find(sno_txtbx.Text);

if (drow == null)

{

drow = ds.Tables[0].NewRow();

drow[0] = sno_txtbx.Text;

drow[1] = sname_txtbx.Text;

drow[2] = course_txtbx.Text;

drow[3] = fee_txtbx.Text;

phototask();

drow[4] = pname;

ds.Tables[0].Rows.Add(drow);

rno = ds.Tables[0].Rows.IndexOf(drow);

ds.WriteXml(fpath);

MessageBox.Show(“record inserted”);

}

else

MessageBox.Show(“sno. should be unique”);

}

void phototask()

{

//finding name of photo ,saving it in directory of xml file with unique name(sno+photo name)

ppath = pictureBox1.ImageLocation;

pname = sno_txtbx.Text + “)” + (ppath.Substring(ppath.LastIndexOf(‘\\’) + 1));//(sno + photo name)

pdestin = fdir + pname;

pictureBox1.Image.Save(pdestin);//saving photo on disk

}

private void searchbtn_Click(object sender, EventArgs e)

{

int n = Convert.ToInt32(Interaction.InputBox(“Enter sno to search:”, “Search”, “10”, 200, 200));

//searching using find method

drow = null;

drow = ds.Tables[0].Rows.Find(n);

if (drow != null)

{

rno = ds.Tables[0].Rows.IndexOf(drow);

sno_txtbx.Text = drow[0].ToString();

sname_txtbx.Text = drow[1].ToString();

course_txtbx.Text = drow[2].ToString();

fee_txtbx.Text = drow[3].ToString();

pictureBox1.ImageLocation = fdir + drow[4];

}

else

MessageBox.Show(“record not found”);

}

private void updatebtn_Click(object sender, EventArgs e)

{

DataRow drow = ds.Tables[0].Rows.Find(sno_txtbx.Text);

if (drow!= null)

{

rno = ds.Tables[0].Rows.IndexOf(drow);

ds.Tables[0].Rows[rno][0] = sno_txtbx.Text;

ds.Tables[0].Rows[rno][1] = sname_txtbx.Text;

ds.Tables[0].Rows[rno][2] = course_txtbx.Text;

ds.Tables[0].Rows[rno][3] = fee_txtbx.Text;

File.Delete(fdir + drow[4]);

phototask();

ds.Tables[0].Rows[rno][4] = pname;

ds.WriteXml(fpath);

MessageBox.Show(“record updated”);

}

else

MessageBox.Show(“no record exists with this sno.”);

}

private void deletebtn_Click(object sender, EventArgs e)

{

DataRow drow = ds.Tables[0].Rows.Find(sno_txtbx.Text);

if (drow!= null)

{

File.Delete(fdir + drow[4]);

ds.Tables[0].Rows.Remove(drow);

ds.WriteXml(openFileDialog1.FileName);

MessageBox.Show(“record deleted”);

rno = 0;

showdata();

}

else

MessageBox.Show(“no record exists with this sno.”);

}

private void firstbtn_Click(object sender, EventArgs e)

{

rno = 0;

showdata();

}

private void prevbtn_Click(object sender, EventArgs e)

{

if (rno > 0)

{

rno–;

showdata();

}

else

{ MessageBox.Show(“first record”); }

}

private void nextbtn_Click(object sender, EventArgs e)

{

if (rno < ds.Tables[0].Rows.Count – 1)

{

rno++;

showdata();

}

else

{ MessageBox.Show(“LastRecord”); }

}

private void lastbtn_Click(object sender, EventArgs e)

{

rno = ds.Tables[0].Rows.Count – 1;

showdata();

}

private void clearbtn_Click(object sender, EventArgs e)

{

sno_txtbx.Text = sname_txtbx.Text = course_txtbx.Text = fee_txtbx.Text = “”;

pictureBox1.Image = null;

}

private void exitbtn_Click(object sender, EventArgs e)

{

this.Close();

}

}

}

——–

Note:

i)In this application, we will search a record by taking input from the InputBox. For this we have to add reference to Microsoft.VisualBasic.

Adding a Reference:

Goto Project Menu

->Add Reference -> select ‘Microsoft.VisualBasic’ from .NET tab.

Inorder to use this we have to include the namespace:

‘using Microsoft.VisualBasic’

ii) xml file and respective jpeg images should be maintained in same folder.

Example for Creating an xml file:

Open notepad and type the following & save it with extension ‘.xml’

——–

<students>

<student>

<sno>10</sno>

<sname>Prashanth</sname>

<course>dotnet</course>

<fee>3500</fee>

<photo>10)prash.jpg</photo>

</student>

<student>

<sno>20</sno>

<sname>Aravind</sname>

<course>oracle</course>

<fee>1000</fee>

<photo>20)aravind.jpg</photo>

</student>

<student>

<sno>30</sno>

<sname>Satyapal</sname>

<course>java</course>

<fee>3000</fee>    <photo>30)satya.jpg</photo>

</student>

<student>

<sno>40</sno>

<sname>Mahender</sname>

<course>php</course>

<fee>2500</fee>

<photo>40)mahi.jpg</photo>

</student>

</students>

Execution:

To execute application click loadxml button and select an xml file

(a folder ‘student data’ consisting xml file is placed in ‘xmlapp.zip’ along with source code)

——————————

Another way of handling xml file:

->performing operations on xml file and saving changes, which includes

creating xml elements(tags), assigning values, appending them to xml root element,…

(for this we have to include namespace ‘using System.Xml’)

Example to insert a record:

XmlDocument doc = new XmlDocument();

doc.Load(openFileDialog1.FileName);

XmlElement root = doc.CreateElement(“student”)

XmlElement sno = doc.CreateElement(“sno”);

XmlElement sname = doc.CreateElement(“sname”);

XmlElement course = doc.CreateElement(“course”);

XmlElement fee = doc.CreateElement(“fee”);

XmlElement photo = doc.CreateElement(“photo”);

sno.InnerText = sno_txtbx.Text;

sname.InnerText = sname_txtbx.Text;

course.InnerText = course_txtbx.Text;

fee.InnerText = fee_txtbx.Text;

phototask();//refer ‘Code’ for phototask()

photo.InnerText == pname;

root.AppendChild(sno);

root.AppendChild(sname);

root.AppendChild(course);

root.AppendChild(fee);

root.AppendChild(photo);

doc.DocumentElement.AppendChild(root);

doc.Save(fdir);

MessageBox.Show(“record inserted”);

 

Posted October 25, 2010 by PrashanthChindam in c#

Inserting & Retrieving records from M.S.Access-2007 using Odbc in C#.net   Leave a comment


Objective:
          To develop a windows application for performing insert, search, update, delete operations & navigation of M.S.Access 2007 records using Odbc connection.

Introduction:
Create a table in M.S.Access 2007 file and populate it.
In our application we use ‘stud.accdb’ (M.S.Access 2007) file, which consists ‘student’ table.
(Note: ‘stud.accdb’ is placed in ‘prash_access07.zip’ along with source code)

Creating and Configuring ODBC Data Source (dsn):

Go to Start Menu -> Control Panel -> Administrative Tools -> Data Sources (ODBC)

Click on ‘Add’ button

-> Select ‘Microsoft Access Driver (*.mdb, *.accdb)’ ->click on ‘Finish’ button.

Give a name to your Data Source
Click on ‘Select’ button and select your M.S.Access 2007 file (*.accdb) -> OK -> OK

Your Data Source Name will be specified in ‘ODBC Data Source Administrator’ window
->Click on ‘OK’ button. 

Thus, your Data Source (dsn) is configured.

Design:

 Design the form as above with a DataGridView, 3 Labels, 3 TextBoxes, 10 buttons.
Introduction to Code:

As we want to use Odbc Connection include the namespace:

‘using System.Data.Odbc’

For accesing records from M.S.Access-2003 file we use ‘Jet’ driver,

But for accesing records from M.S.Access-2003 file we use ‘Ace’ driver.

In this application, we will search a record by taking input from the InputBox. For this we have to add reference to Microsoft.VisualBasic.

Adding a Reference:

Goto Project Menu ->Add Reference -> select ‘Microsoft.VisualBasic’ from .NET tab.

In order to use this we have to include the namespace:

‘using Microsoft.VisualBasic’

Odbc connection string:

Syntax:

OdbcConnection con = new OdbcConnection(“dsn=<Data Source Name>”);

Ex:
OdbcConnection con = new OdbcConnection(“dsn=myaccess07dsn “);

You just need to specify the Data Source Name(dsn) in the Connection String, no need to specify the driver details and path of the file, you dsn will take care of it.
Creating a primary key in the dataTable:

In this app. we use Find() method to search a record, which requires details of primarykey column for database tables; this is provided using statement:

adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey

But as we don’t have any primarykey column in M.S.Access table, we have to create a primary key column in datatable.
Ex:
ds.Tables[0].Constraints.Add(“pk_sno”, ds.Tables[0].Columns[0], true);
Pointing to current record in dataTable:

After searching a record, we have to get the index of that record so that we can show next and previous records when we press ‘>>'(next) and ‘<<‘(previous) buttons.
Ex:
rno= ds.Tables[0].Rows.IndexOf(drow);
————-
Code:

using System;

using System.Data;

using System.Windows.Forms;

using System.Data.Odbc;

using Microsoft.VisualBasic;

namespace prash_access07

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }

        OdbcConnection con;

        OdbcCommand cmd;

        OdbcDataAdapter adapter;

        DataSet ds;

        int rno;

        private void Form1_Load(object sender, EventArgs e)

        {

            con = new OdbcConnection(“dsn=myaccess07dsn”);

            //stud.accdb->access07 filename

            loaddata();

            showdata();

        }

        void loaddata()

        {

            adapter = new OdbcDataAdapter(“select * from student”, con);

            ds = new DataSet();//student-> table name in stud.accdb file

            adapter.Fill(ds, “student”);

            ds.Tables[0].Constraints.Add(“pk_sno”, ds.Tables[0].Columns[0], true);//creating primary key for Tables[0] in dataset

            dataGridView1.DataSource = ds.Tables[0];

        }

        void showdata()

        {

            textBox1.Text = ds.Tables[0].Rows[rno][0].ToString();

            textBox2.Text = ds.Tables[0].Rows[rno][1].ToString();

            textBox3.Text = ds.Tables[0].Rows[rno][2].ToString();

        }

        private void btnFirst_Click(object sender, EventArgs e)

        {

            if (ds.Tables[0].Rows.Count > 0)

            {

                rno = 0;

                showdata();

            }

            else

                MessageBox.Show(“no records”);

        }

        private void btnPrevious_Click(object sender, EventArgs e)

        {

            if (ds.Tables[0].Rows.Count > 0)

            {

                if (rno > 0)

                {

                    rno–;

                    showdata();

                }

                else

                    MessageBox.Show(“First Record”);

            }

            else

                MessageBox.Show(“no records”);

        }

        private void btnNext_Click(object sender, EventArgs e)

        {

            if (ds.Tables[0].Rows.Count > 0)

            {

                if (rno < ds.Tables[0].Rows.Count – 1)

                {

                    rno++;

                    showdata();

                }

                else

                    MessageBox.Show(“Last Record”);

            }

            else

                MessageBox.Show(“no records”);

        }

        private void btnLast_Click(object sender, EventArgs e)

        {

            if (ds.Tables[0].Rows.Count > 0)

            {

                rno = ds.Tables[0].Rows.Count – 1;

                showdata();

            }

            else

                MessageBox.Show(“no records”);

        }

        private void btnInsert_Click(object sender, EventArgs e)

        {

            cmd = new OdbcCommand(“insert into student values(” + textBox1.Text + “,’ ” + textBox2.Text + ” ‘,’ ” + textBox3.Text + ” ‘)”, con);

            con.Open();

            int n = cmd.ExecuteNonQuery();

            con.Close();

            if (n > 0)

            {

                MessageBox.Show(“record inserted”);

                loaddata();

            }

            else

                MessageBox.Show(“insertion failed”);

        }

        private void btnSearch_Click(object sender, EventArgs e)

        {

            int n = Convert.ToInt32(Interaction.InputBox(“Enter sno:”, “Search”, “20”, 200, 200));

            DataRow drow = ds.Tables[0].Rows.Find(n);

            if (drow != null)

            {

                rno = ds.Tables[0].Rows.IndexOf(drow);

                textBox1.Text = drow[0].ToString();

                textBox2.Text = drow[1].ToString();

                textBox3.Text = drow[2].ToString();

            }

            else

                MessageBox.Show(“Record not found”);

        }

        private void btnUpdate_Click(object sender, EventArgs e)

        {

            cmd = new OdbcCommand(“update student set sname='” + textBox2.Text + “‘,course='” + textBox3.Text + “‘ where sno=” + textBox1.Text, con);

            con.Open();

            int n = cmd.ExecuteNonQuery();

            con.Close();

            if (n > 0)

            {

                MessageBox.Show(“Record Updated”);

                loaddata();

            }

            else

                MessageBox.Show(“Update failed”);

        }

        private void btnDelete_Click(object sender, EventArgs e)

        {

            cmd = new OdbcCommand(“delete from student where sno=” + textBox1.Text, con);

            con.Open();

            int n = cmd.ExecuteNonQuery();

            con.Close();

            if (n > 0)

            {

                MessageBox.Show(“Record Deleted”);

                loaddata();

            }

             else

                MessageBox.Show(“Deletion failed”);

        }

         private void btnClear_Click(object sender, EventArgs e)

        {

            textBox1.Text = textBox2.Text = textBox3.Text = “”;

        } 

        private void btnExit_Click(object sender, EventArgs e)

        {

            this.Close();

        }    

    }

}

Posted October 13, 2010 by PrashanthChindam in c#

inserting & retrieving images from database without using stored procedures   Leave a comment


Objective:

          To insert into & retrieve images from SQL server database without using stored procedures and also to perform insert, search, update and delete operations & navigation of records.

Introduction:

As we want to insert images into the database, first we have to create a table in the database, we can use the data type ‘image’ or ‘binary’ for storing the image.

Query for creating table in our application:
create table student(sno int primary key,sname varchar(50),course varchar(50),fee money,photo image)

Design:

 

Design the form as above with 1 PictureBox control, 1 OpenFileDialog control, 4 Labels, 4 TextBoxes and 11 Buttons.

PictureBox1 Properties:
    BorderStyle=Fixed3D; SizeMode=StrechImage

Note that OpenFileDialog control appears below the form(not on the form), which can be used for browsing an image.

 


Introduction to code:

Inorder to communicate with SQL sever database, include the namespace
‘using System.Data.SqlClient’.

In this application, we will search a record by taking input from the InputBox. For this we have to add reference to Microsoft.VisualBasic.

Adding a Reference to ‘Microsoft.VisualBasic’:

Goto Project Menu ->Add Reference -> select ‘Microsoft.VisualBasic’ from .NET tab.
In order to use this reference we have to include the namespace:
‘using Microsoft.VisualBasic’ in the code.

Converting image into binary data:

We can’t store an image directly into the database. For this we have two solutions:

i) To store the location of the image in the database

ii) Converting the image into binary data and insert that binary data into database and convert that back to image while retrieving the records.

If we store the location of an image in the database, and suppose if that image is deleted or moved from that location, we will face problems while retrieving the records. So it is better to convert image into binary data and insert that binary data into database and convert that back to image while retrieving records.

->We can convert an image into binary data using 1. FileStream (or) 2. MemoryStream

1. FileStream uses file location to convert an image into binary data which we may/may not provide during updation of a record.
Ex:
      FileStream fs = new FileStream(openFileDialog1.FileName, FileMode.Open,                       FileAccess.Read);
      byte[] photo_aray = new byte[fs.Length];
      fs.Read(photo_aray, 0, photo_aray.Length);

2. So it is better to use MemoryStream which uses image in the PictureBox to convert an image into binary data.
Ex:
             MemoryStream ms = new MemoryStream();
             pictureBox1.Image.Save(ms, ImageFormat.Jpeg);
             byte[] photo_aray = new byte[ms.Length];
             ms.Position = 0;
             ms.Read(photo_aray, 0, photo_aray.Length);

->Inorder to use FileStream or MemoryStream we have to include the namespace:
‘using System.IO’.

            
OpenFileDialog Control:
We use OpenFileDialog control inorder to browse for the images (photos) to insert into the record.

Loading the constraint details into the dataTable:
In this app. we use Find() method to search a record, which requires details of primarykey column, which can be provided using the statement:
adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;

Pointing to current record in dataTable:
After searching a record, we have to get the index of that record so that we can navigate the next and previous records.
 Ex:
rno= ds.Tables[0].Rows.IndexOf(drow);
————-
Code:

using System;

using System.Windows.Forms;

using System.Data;

using System.Data.SqlClient;

using System.Drawing;

using System.Drawing.Imaging;

using System.IO;

using Microsoft.VisualBasic;

namespace inserting_imgs

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }

        SqlConnection con;

        SqlCommand cmd;

        SqlDataAdapter adapter;

        DataSet ds; int rno = 0;

        MemoryStream ms;

        byte[] photo_aray;

        private void Form1_Load(object sender, EventArgs e)

        {

            con = new SqlConnection(“user id=sa;password=123;database=prash”);

            loaddata();

            showdata();

        }

        void loaddata()

        {

            adapter = new SqlDataAdapter(“select sno,sname,course,fee,photo from student”, con);

            adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;

            ds = new DataSet(); adapter.Fill(ds, “student”);

        }

        void showdata()

        {

            if (ds.Tables[0].Rows.Count > 0)

            {

                textBox1.Text = ds.Tables[0].Rows[rno][0].ToString();

                textBox2.Text = ds.Tables[0].Rows[rno][1].ToString();

                textBox3.Text = ds.Tables[0].Rows[rno][2].ToString();

                textBox4.Text = ds.Tables[0].Rows[rno][3].ToString();

                pictureBox1.Image = null;

                if (ds.Tables[0].Rows[rno][4] != System.DBNull.Value)

                {

                    photo_aray = (byte[])ds.Tables[0].Rows[rno][4];

                    MemoryStream ms = new MemoryStream(photo_aray);

                    pictureBox1.Image = Image.FromStream(ms);

                }

            }

            else

                MessageBox.Show(“No Records”);

        }

        private void browse_Click(object sender, EventArgs e)

        {

            openFileDialog1.Filter = “jpeg|*.jpg|bmp|*.bmp|all files|*.*”;

            DialogResult res = openFileDialog1.ShowDialog();

            if (res == DialogResult.OK)

            {

                pictureBox1.Image = Image.FromFile(openFileDialog1.FileName);

            }

        }

        private void newbtn_Click(object sender, EventArgs e)

        {

            cmd = new SqlCommand(“select max(sno)+10 from student”, con);

            con.Open();

            textBox1.Text = cmd.ExecuteScalar().ToString();

            con.Close();

            textBox2.Text = textBox3.Text = textBox4.Text = “”;

            pictureBox1.Image = null;

        }

        private void insert_Click(object sender, EventArgs e)

        {

            cmd = new SqlCommand(“insert into student(sno,sname,course,fee,photo) values(” + textBox1.Text + “,'” + textBox2.TabIndex + “‘,'” + textBox3.Text + “‘,” + textBox4.Text + “,@photo)”, con);

            conv_photo();

            con.Open();

            int n = cmd.ExecuteNonQuery();

            con.Close();

            if (n > 0)

            {

                MessageBox.Show(“record inserted”);

                loaddata();

            }

            else

                MessageBox.Show(“insertion failed”);

        }

        void conv_photo()

        {

            //converting photo to binary data

            if (pictureBox1.Image != null)

            {

                //using FileStream:(will not work while updating, if image is not changed)

                //FileStream fs = new FileStream(openFileDialog1.FileName, FileMode.Open, FileAccess.Read);

                //byte[] photo_aray = new byte[fs.Length];

                //fs.Read(photo_aray, 0, photo_aray.Length); 

                //using MemoryStream:

                ms = new MemoryStream();

                pictureBox1.Image.Save(ms, ImageFormat.Jpeg);

                byte[] photo_aray = new byte[ms.Length];

                ms.Position = 0;

                ms.Read(photo_aray, 0, photo_aray.Length);

                cmd.Parameters.AddWithValue(“@photo”, photo_aray);

            }

        }

        private void search_Click(object sender, EventArgs e)

        {

            try

            {

                int n = Convert.ToInt32(Interaction.InputBox(“Enter sno:”, “Search”, “20”, 100, 100));

                DataRow drow;

                drow = ds.Tables[0].Rows.Find(n);

                if (drow != null)

                {

                    rno = ds.Tables[0].Rows.IndexOf(drow);

                    textBox1.Text = drow[0].ToString();

                    textBox2.Text = drow[1].ToString();

                    textBox3.Text = drow[2].ToString();

                    textBox4.Text = drow[3].ToString();

                    pictureBox1.Image = null;

                    if (drow[4] != System.DBNull.Value)

                    {

                        photo_aray = (byte[])drow[4];

                        MemoryStream ms = new MemoryStream(photo_aray);

                        pictureBox1.Image = Image.FromStream(ms);

                    }

                }

                else

                    MessageBox.Show(“Record Not Found”);

            }

            catch

            {

                MessageBox.Show(“Invalid Input”);

            }

        }

        private void update_Click(object sender, EventArgs e)

        {

            cmd = new SqlCommand(“update student set sname='” + textBox2.Text + “‘, course='” + textBox3.Text + “‘, fee='” + textBox4.Text + “‘, photo=@photo where sno=” + textBox1.Text, con);

            conv_photo();

            con.Open();

            int n = cmd.ExecuteNonQuery();

            con.Close();

            if (n > 0)

            {

                MessageBox.Show(“Record Updated”);

                loaddata();

            }

            else

                MessageBox.Show(“Updation Failed”);

        }

        private void delete_Click(object sender, EventArgs e)

        {

            cmd = new SqlCommand(“delete from student where sno=” + textBox1.Text, con);

            con.Open();

            int n = cmd.ExecuteNonQuery();

            con.Close();

            if (n > 0)

            {

                MessageBox.Show(“Record Deleted”);

                loaddata();

                rno = 0;

                showdata();

            }

            else

                MessageBox.Show(“Deletion Failed”);

        }

        private void first_Click(object sender, EventArgs e)

        {

            rno = 0; showdata();

            MessageBox.Show(“First record”);

        }

        private void previous_Click(object sender, EventArgs e)

        {

            if (rno > 0)

            {

                rno–; showdata();

            }

            else

                MessageBox.Show(“First record”);

        }

        private void next_Click(object sender, EventArgs e)

        {

            if (rno < ds.Tables[0].Rows.Count – 1)

            {

                rno++; showdata();

            }

            else

                MessageBox.Show(“Last record”);

        }

        private void last_Click(object sender, EventArgs e)

        {

            rno = ds.Tables[0].Rows.Count – 1;

            showdata(); MessageBox.Show(“Last record”);

        }

        private void exit_Click(object sender, EventArgs e)

        {

            this.Close();

        }     

      }

}

Posted October 10, 2010 by PrashanthChindam in c#

inserting & retrieving images from database using stored procedures   1 comment


Objective:

          To insert & retrieve images from SQL server database using stored procedures and also to perform insert, search, update and delete operations & navigation of records.

Introduction:

As we want to insert images into database using stored procedures, we have to create a table and stored procedures in the database.

Query for creating table:
create table student(sno int primary key,sname varchar(50),course varchar(50),fee money,photo image)

Stored procedures:

create procedure  get_student
as
select  sno,sname, course, fee, photo from student
———–

create procedure insert_student (@sno int, @sname varchar(50), @course varchar(50), @fee smallmoney,@photo image=null)
as
insert into student(sno, sname,course, fee, photo) values (@sno, @sname, @course, @fee, @photo)
—————

create procedure  update_student(@sno int, @sname varchar(50),@course varchar(50), @fee smallmoney,@photo image=null)
as
update student set sname=@sname, course=@course, fee=@fee, photo=@photo where sno=@sno
————

create procedure delete_student(@sno int=null)
as
if not(@sno=null)
delete from student where sno=@sno

———————————————


Design:

 

Design the form as above with 1 PictureBox control, 1 OpenFileDialog control, 4 Labels, 4 TextBoxes and 11 Buttons.

PictureBox1 Properties:
    BorderStyle=Fixed3D; SizeMode=StrechImage

Note that OpenFileDialog control appears below the form(not on the form).

 

Introduction to code:

Inorder to communicate with SQL sever database, include the namespace
‘using System.Data.SqlClient’.

In this application, we will search a record by taking input from the InputBox. For this we have to add reference to Microsoft.VisualBasic.

Adding a Reference to ‘Microsoft.VisualBasic’:

Goto Project Menu ->Add Reference -> select ‘Microsoft.VisualBasic’ from .NET tab.
In order to use this reference we have to include the namespace:
‘using Microsoft.VisualBasic’ in the code.

Converting image into binary data:

We can’t store an image directly into the database. For this we have to solutions:

i) To store the location of the image in the database

ii) Converting the image into binary data and insert that binary data into database and convert that back to image while retrieving the records.

If we store the location of an image in the database, and suppose if that image is deleted or moved from that location, we will face problems while retrieving the records. So it is better to convert image into binary data and insert that binary data into database and convert that back to image while retrieving records.

->We can convert an image into binary data using 1. FileStream (or) 2. MemoryStream

1. FileStream uses file location to convert an image into binary data which we may/may not provide during updation of a record.
Ex:
      FileStream fs = new FileStream(openFileDialog1.FileName, FileMode.Open,                       FileAccess.Read);
      byte[] photo_aray = new byte[fs.Length];
      fs.Read(photo_aray, 0, photo_aray.Length);

2. So it is better to use MemoryStream which uses image in the PictureBox to convert an image into binary data.
Ex:
             MemoryStream ms = new MemoryStream();
             pictureBox1.Image.Save(ms, ImageFormat.Jpeg);
             byte[] photo_aray = new byte[ms.Length];
             ms.Position = 0;
             ms.Read(photo_aray, 0, photo_aray.Length);

->Inorder to use FileStream or MemoryStream we have to include the namespace:
‘using System.IO’.
          
OpenFileDialog Control:

We use OpenFileDialog control inorder to browse for the images (photos) to insert into the record.

Using DataAdapter with StoredProcedures:

We can use command object inorder to work with stored procedures by passing stored procedure name to command object and specifying CommandType as StoredProcedure

Ex:
cmd = new SqlCommand(“get_student”, con);
cmd.CommandType = CommandType.StoredProcedure;

DataAdapter can’t interact directly with the stored procedures, but if we need to use DataAdapter while working with stored procedures, we can achieve this by passing the command object to the DataAdapter.

Loading the constraint details into the dataTable:

In this app. we use Find() method to search a record, which requires details of primarykey column, which can be provided using the statement:
adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;

Pointing to current record in dataTable:

After searching a record, we have to get the index of that record so that we can show next and previous records when we press ‘>>'(next) and ‘<<‘(previous) buttons.

Ex:
rno= ds.Tables[0].Rows.IndexOf(drow);

Code:

using System;

using System.Windows.Forms;

using System.Data;

using System.Data.SqlClient;

using System.Drawing;

using System.Drawing.Imaging;

using System.IO;

using Microsoft.VisualBasic;

namespace inserting_imgs

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }

        SqlConnection con;

        SqlCommand cmd;

        SqlDataAdapter adapter;

        DataSet ds; int rno = 0;

        MemoryStream ms;

        byte[] photo_aray;

        private void Form1_Load(object sender, EventArgs e)

        {

            con = new SqlConnection(“user id=sa;password=123;database=prash”);

            loaddata();

            showdata();

        }

        void loaddata()

        {

            cmd = new SqlCommand(“get_student”, con);

            cmd.CommandType = CommandType.StoredProcedure; adapter = new SqlDataAdapter(cmd);

            adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;

            ds = new DataSet(); adapter.Fill(ds, “student”);

        }

        void showdata()

        {

            if (ds.Tables[0].Rows.Count > 0)

            {

                textBox1.Text = ds.Tables[0].Rows[rno][0].ToString();

                textBox2.Text = ds.Tables[0].Rows[rno][1].ToString();

                textBox3.Text = ds.Tables[0].Rows[rno][2].ToString();

                textBox4.Text = ds.Tables[0].Rows[rno][3].ToString();

                pictureBox1.Image = null;

                if (ds.Tables[0].Rows[rno][4] != System.DBNull.Value)

                {

                    photo_aray = (byte[])ds.Tables[0].Rows[rno][4];

                    MemoryStream ms = new MemoryStream(photo_aray);

                    pictureBox1.Image = Image.FromStream(ms);

                }

            }

            else

                MessageBox.Show(“No Records”);

        }        

        private void browse_Click(object sender, EventArgs e)

        {

            openFileDialog1.Filter = “jpeg|*.jpg|bmp|*.bmp|all files|*.*”;

            DialogResult res = openFileDialog1.ShowDialog();

            if (res == DialogResult.OK)

            {

                pictureBox1.Image = Image.FromFile(openFileDialog1.FileName);

            }

        }

        private void clear_Click(object sender, EventArgs e)

        {

            textBox1.Text = textBox2.Text = textBox3.Text = textBox4.Text = “”;

            pictureBox1.Image = null;

        }

        private void insert_Click(object sender, EventArgs e)

        {

            cmd = new SqlCommand(“insert_student”, con);

            cmd.CommandType = CommandType.StoredProcedure;

            cmd.Parameters.AddWithValue(“@sno”, textBox1.Text);

            cmd.Parameters.AddWithValue(“@sname”, textBox2.Text);

            cmd.Parameters.AddWithValue(“@course”, textBox3.Text);

            cmd.Parameters.AddWithValue(“@fee”, textBox4.Text);

            conv_photo();

            con.Open();

            int n = cmd.ExecuteNonQuery();

            con.Close();

            if (n > 0)

            {

                MessageBox.Show(“record inserted”);

                loaddata();

            }

            else

                MessageBox.Show(“insertion failed”);

        }

        void conv_photo()

        {

            //converting photo to binary data

            if (pictureBox1.Image != null)

            {

                //using FileStream: (will not work in updating record without changing photo)

                //FileStream fs = new FileStream(openFileDialog1.FileName, FileMode.Open, FileAccess.Read);

                //byte[] photo_aray = new byte[fs.Length];

                //fs.Read(photo_aray, 0, photo_aray.Length); 

                //using MemoryStream: (works for updating record without changing photo)

                ms = new MemoryStream();

                pictureBox1.Image.Save(ms, ImageFormat.Jpeg);

                byte[] photo_aray = new byte[ms.Length];

                ms.Position = 0;

                ms.Read(photo_aray, 0, photo_aray.Length);

                cmd.Parameters.AddWithValue(“@photo”, photo_aray);

            }

        }

        private void search_Click(object sender, EventArgs e)

        {

            try

            {

                int n = Convert.ToInt32(Interaction.InputBox(“Enter sno:”, “Search”, “20”, 100, 100));

                DataRow drow;

                drow = ds.Tables[0].Rows.Find(n);

                if (drow != null)

                {

                    rno = ds.Tables[0].Rows.IndexOf(drow);

                    textBox1.Text = drow[0].ToString();

                    textBox2.Text = drow[1].ToString();

                    textBox3.Text = drow[2].ToString();

                    textBox4.Text = drow[3].ToString();

                    pictureBox1.Image = null;

                    if (drow[4] != System.DBNull.Value)

                    {

                        photo_aray = (byte[])drow[4];

                        MemoryStream ms = new MemoryStream(photo_aray);

                        pictureBox1.Image = Image.FromStream(ms);

                    }

                }

                else

                    MessageBox.Show(“Record Not Found”);

            }

            catch

            {

                MessageBox.Show(“Invalid Input”);

            }

        }

        private void update_Click(object sender, EventArgs e)

        {

            cmd = new SqlCommand(“update_student”, con);

            cmd.CommandType = CommandType.StoredProcedure;

            cmd.Parameters.AddWithValue(“@sno”, textBox1.Text);

            cmd.Parameters.AddWithValue(“@sname”, textBox2.Text);

            cmd.Parameters.AddWithValue(“@course”, textBox3.Text);

            cmd.Parameters.AddWithValue(“@fee”, textBox4.Text);

            conv_photo();

            con.Open();

            int n = cmd.ExecuteNonQuery();

            con.Close();

            if (n > 0)

            {

                MessageBox.Show(“Record Updated”);

                loaddata();

            }

            else

                MessageBox.Show(“Updation Failed”);

        }

        private void delete_Click(object sender, EventArgs e)

        {

            cmd = new SqlCommand(“delete_student”, con);

            cmd.CommandType = CommandType.StoredProcedure;

            cmd.Parameters.AddWithValue(“@sno”, textBox1.Text);

            con.Open();

            int n = cmd.ExecuteNonQuery();

            con.Close();

            if (n > 0)

            {

                MessageBox.Show(“Record Deleted”);

                loaddata();

                rno = 0;

                showdata();

            }

            else

                MessageBox.Show(“Deletion Failed”);

        }

        private void first_Click(object sender, EventArgs e)

        {

            rno = 0; showdata();

            MessageBox.Show(“First record”);

        }

        private void previous_Click(object sender, EventArgs e)

        {

            if (rno > 0)

            {

                rno–; showdata();

            }

            else

                MessageBox.Show(“First record”);

        }

        private void next_Click(object sender, EventArgs e)

        {

            if (rno < ds.Tables[0].Rows.Count – 1)

            {

                rno++; showdata();

            }

            else

                MessageBox.Show(“Last record”);

        }

        private void last_Click(object sender, EventArgs e)

        {

            rno = ds.Tables[0].Rows.Count – 1;

            showdata(); MessageBox.Show(“Last record”);

        }

        private void exit_Click(object sender, EventArgs e)

        {

            this.Close();

        }     

    }

}

Posted October 10, 2010 by PrashanthChindam in c#

inserting & retrieving records from M.S.Access-2007 using oledb in C#.net   Leave a comment


Objective:

To insert, search, edit and delete records from M.S.Access-2007 file using OleDb Connection.

Design:


Design the form as above with a DataGridView, 3 Labels, 3 TextBoxes, 10 buttons.

[ Note: In order to perform operations on M.S.Access-2007 records,
M.S.Office-2007 should be installed in your system.]

Introduction:

As we want to use OleDb Connection include the namespace:

‘using System.Data.OleDb’

For accesing records from M.S.Access-2003 file we use ‘Jet’ driver,

but for accesing records from M.S.Access-2003 file we use ‘Ace’ driver.

In this application, we will search a record by taking input from the InputBox. For this we have to add reference to Microsoft.VisualBasic.

Adding a Reference:

Goto Project Menu

->Add Reference -> select ‘Microsoft.VisualBasic’ from .NET tab.

Inorder to use this we have to include the namespace:

‘using Microsoft.VisualBasic’

->creating a primary key in the dataTable:

In this app. we use Find() method to search a record, which requires details of primarykey column for database tables this provided using statement: adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey

But as we don’t have any primarykey column in M.S.Access table, we have to create a primary key column in datatable.

Eg:

ds.Tables[0].Constraints.Add(“pk_sno”, ds.Tables[0].Columns[0], true);

->pointing to current record in dataTable:

After searching a record, we have to get index of that record so that we can show next and previous records when we press ‘>>’(next) and ‘<<’(previous) buttons.

Eg:

rno= ds.Tables[0].Rows.IndexOf(drow);

—————————————————–

Code:

using System;

using System.Data;

using System.Windows.Forms;

using System.Data.OleDb;

using Microsoft.VisualBasic;

namespace prash_access07

{

public partial class Form1 : Form

{

public Form1()

{

InitializeComponent();

}

OleDbConnection con;

OleDbCommand cmd;

OleDbDataAdapter adapter;

DataSet ds;

int rno;

private void Form1_Load(object sender, EventArgs e)

{

con = new OleDbConnection(@” provider=Microsoft.ace.Oledb.12.0; data source=E:\prash\stud.accdb;Persist Security Info=False”);//stud.accdb->access07 filename

loaddata();

showdata();

}

void loaddata()

{

adapter = new OleDbDataAdapter(“select * from student”, con);

ds = new DataSet();//student-> table name in stud.accdb file

adapter.Fill(ds, “student”);

ds.Tables[0].Constraints.Add(“pk_sno”, ds.Tables[0].Columns[0], true);//creating primary key for Tables[0] in dataset

dataGridView1.DataSource = ds.Tables[0];

}

void showdata()

{

textBox1.Text = ds.Tables[0].Rows[rno][0].ToString();

textBox2.Text = ds.Tables[0].Rows[rno][1].ToString();

textBox3.Text = ds.Tables[0].Rows[rno][2].ToString();

}

private void btnFirst_Click(object sender, EventArgs e)

{

if (ds.Tables[0].Rows.Count > 0)

{

rno = 0;

showdata();

}

else

MessageBox.Show(“no records”);

}

private void btnPrevious_Click(object sender, EventArgs e)

{

if (ds.Tables[0].Rows.Count > 0)

{

if (rno > 0)

{

rno–;

showdata();

}

else

MessageBox.Show(“First Record”);

}

else

MessageBox.Show(“no records”);

}

private void btnNext_Click(object sender, EventArgs e)

{

if (ds.Tables[0].Rows.Count > 0)

{

if (rno < ds.Tables[0].Rows.Count – 1)

{

rno++;

showdata();

}

else

MessageBox.Show(“Last Record”);

}

else

MessageBox.Show(“no records”);

}

private void btnLast_Click(object sender, EventArgs e)

{

if (ds.Tables[0].Rows.Count > 0)

{

rno = ds.Tables[0].Rows.Count – 1;

showdata();

}

else

MessageBox.Show(“no records”);

}

private void btnInsert_Click(object sender, EventArgs e)

{

cmd = new OleDbCommand(“insert into student values(” + textBox1.Text + “,’ ” + textBox2.Text + ” ‘,’ ” + textBox3.Text + ” ‘)”, con);

con.Open();

int n = cmd.ExecuteNonQuery();

con.Close();

if (n > 0)

{

MessageBox.Show(“record inserted”);

loaddata();

}

else

MessageBox.Show(“insertion failed”);

}

private void btnSearch_Click(object sender, EventArgs e)

{

int n = Convert.ToInt32(Interaction.InputBox(“Enter sno:”, “Search”, “20”, 200, 200));

DataRow drow = ds.Tables[0].Rows.Find(n);

if (drow != null)

{

rno = ds.Tables[0].Rows.IndexOf(drow);

textBox1.Text = drow[0].ToString();

textBox2.Text = drow[1].ToString();

textBox3.Text = drow[2].ToString();

}

else

MessageBox.Show(“Record not found”);

}

private void btnUpdate_Click(object sender, EventArgs e)

{

cmd = new OleDbCommand(“update student set sname='” + textBox2.Text + “‘,course='” + textBox3.Text + “‘ where sno=” + textBox1.Text, con);

con.Open();

int n = cmd.ExecuteNonQuery();

con.Close();

if (n > 0)

{

MessageBox.Show(“Record Updated”);

loaddata();

}

else

MessageBox.Show(“Update failed”);

}

private void btnDelete_Click(object sender, EventArgs e)

{

cmd = new OleDbCommand(“delete from student where sno=” + textBox1.Text, con);

con.Open();

int n = cmd.ExecuteNonQuery();

con.Close();

if (n > 0)

{

MessageBox.Show(“Record Deleted”);

loaddata();

}

else

MessageBox.Show(“Deletion failed”);

}

private void btnClear_Click(object sender, EventArgs e)

{

textBox1.Text = textBox2.Text = textBox3.Text = “”;

}

private void btnExit_Click(object sender, EventArgs e)

{

this.Close();

}

}

}

Posted October 4, 2010 by PrashanthChindam in c#

Application to speak the text written in the textbox using C#.Net   Leave a comment


Application to speak the text in the textbox using C#.Net

 Design:                               

 Design the form as shown above with one TextBox and three Buttons,

Set the ‘textBox1’ Properties as follows:

Dock: Top,

Multiline: True.

->Now  goto ‘Project’ Menu -> Select ‘AddReference’-> Click on ‘COM’ tab,

    Select ‘Microsoft Speech Object Library’ COM component -> OK          

          

 ->Now goto code window and include ‘using SpeechLib’ namespace

Code:

 

using System;

using System.Windows.Forms;

using SpeechLib;//include this namespace

namespace TextSpeaker

{

    public partial class TextSpeakerForm : Form

    {

        public TextSpeakerForm()

        {

            InitializeComponent();

        }

        private void btnSpeak_Click(object sender, EventArgs e)

        {

            if (textBox1.Text.Trim().Length > 0)

            {

                SpVoice obj = new SpVoice();

                obj.Speak(textBox1.Text, SpeechVoiceSpeakFlags.SVSFDefault);

            }

            MessageBox.Show(“Plz. write some text in the TextBox”,”Info.”,MessageBoxButtons.OK,MessageBoxIcon.Information);

        }

        private void btnClear_Click(object sender, EventArgs e)

        {

            textBox1.Text = “”;

        }

        private void btnExit_Click(object sender, EventArgs e)

        {

            this.Close();

        }

    }

}

Output:

            Write some text in the textbox and press ‘speak’ button

                                 

Posted September 28, 2010 by PrashanthChindam in c#

sending e-mail to gmail using asp.net web application   Leave a comment


gmail app.

Design:

——————–

Code:

using System;

using System.Net;

using System.Net.Mail;

public partial class _Default : System.Web.UI.Page

{

MailMessage msgobj;

protected void btnSend_Click(object sender, EventArgs e)

{

SmtpClient serverobj = new SmtpClient();

serverobj.Credentials = new NetworkCredential(TextBox1.Text, TextBox2.Text);

serverobj.Port = 587;

serverobj.Host = “smtp.gmail.com”;

serverobj.EnableSsl = true;

msgobj = new MailMessage();

msgobj.From = new MailAddress(TextBox1.Text, “email demo”, System.Text.Encoding.UTF8);

msgobj.To.Add(TextBox3.Text);

msgobj.Priority = MailPriority.High;

msgobj.Subject = TextBox4.Text;

msgobj.Body = TextBox5.Text;

msgobj.Attachments.Add(new Attachment(MapPath(“accept.jpg”)));

msgobj.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure;

serverobj.Send(msgobj);

LabelOutput.Text = “mail sent successfully…!”;

}

}

————–

Output:

Posted September 20, 2010 by PrashanthChindam in asp.net

Windows Speed Secrets   Leave a comment


speed secrets

Posted September 19, 2010 by PrashanthChindam in System

Computers Tips And Tricks   Leave a comment


Computers Tips And Tricks- Prashanth.Chindam

Process to enable ‘Hibernate’ feature in Windows7:

In Windows XP enabling Hibernate option was a very easy task, but we have to follow a different approach to do the same job in Vista and Windows 7.

If you are not aware of Hibernate feature, Hibernation is a power-saving state designed primarily for laptops. While sleep puts your work and settings in memory and draws a small amount of power, hibernation puts your open documents and programs on your hard disk and then turns off your computer. Of all the power-saving states in Windows, hibernation uses the least amount of power. On a laptop, use hibernation when you know that you won’t use your laptop for an extended period and won’t have an opportunity to charge the battery during that time.

So if you are really going to use this feature then you need to enable it by doing a simple procedure as mentioned below:

1. Open Command Prompt with Administrator rights. To open Command Prompt, type CMD in Start menu and then hit Ctrl + Shift + Enter to open the Command Prompt with Admin rights.

2. Next, type the below command and hit enter:

powercfg /hibernate on

3. Type exit and hit enter to close the Command Prompt.

4. If you can’t see the Hibernate option in Start menu then do the following tasks:

A. Type Power Options in Start menu and hit enter.

B. In the left pane, open the link labeled “Change when the computer sleeps” and then open the link “Change advanced power settings”.

—————————————-

How to enable the advance performance setting in windows vista?

If you have noticed that the speed of your system is very slow with windows vista then today tip is very useful for you to increase the performance of windows vista. There is some default setting in vista which is used to manage the write caching on disk. By default windows enabled the write caching on disk but the advanced performance setting is disabled.

Follow the given steps to configure the advance performance setting in Windows Vista:

To enable this feature, you will need to be logged into your computer with administrative rights.

First right click on My Computer icon then select the option Manage.

Here small windows will appear with title Computer Management, now select the Device Manager option, then locate the SATA Disk under the Disk Drives.

Here select the enable advanced performance sittings on the SATA disk.

Now click on Ok button to apply the setting and restart your computer after any changes to go into effect.

—————————————-

How to increase the Browsing and Downloading speed in Windows Vista?

With windows Vista you have noticed the slow internet speed. The web browsing and downloading speed is very slow as compare to previous versions of windows. You can open the same sites in windows XP and server 2003 with the normal speed.

Follow the given steps to increase the Vista browsing speed:

First go to Advance tab in Internet Explorer and turn off the TLS (Transport Layer Security) encryption option. Here to fix problem with some secure pages turn on the SSL 2.0 (Secure Sockets Layer) feature and click Ok button to close it.

Follow the major fix for this problem:

In windows Vista, the TCP autotuning feature is enabled by default. Some web servers do not respond properly to this feature, so it appears that some sites open with very slow speed.

To use this feature, you will need to be logged into your computer with administrative rights.

First click on Start button and type CMD in Run option then press Enter.

At Command Prompt, type the following command and press enter.

netsh interface tcp set global autotuninglevel= disabled

This command will disable the TCP autotuning feature. Now close the command Prompt and restart your computer after any changes to go into effect.

You can easily restore these setting by typing the following command at Command Prompt.

netsh interface tcp set global autotuninglevel= normal

Now close the command Prompt and again restart your computer after any changes to go into effect.

Boot Windows xp Fast :

Follow the following steps to boot windows xp fast
1. Open notepad.exe, type “del c:\windows\prefetch\ntosboot-*.* /q” (without the quotes) & save as “ntosboot.bat” in c:\
2. From the Start menu, select “Run…” & type “gpedit.msc”.
3. Double click “Windows Settings” under “Computer Configuration” and double click again on “Shutdown” in the right window.
4. In the new window, click “add”, “Browse”, locate your “ntosboot.bat” file & click “Open”.
5. Click “OK”, “Apply” & “OK” once again to exit.
6. From the Start menu, select “Run…” & type “devmgmt.msc”.
7. Double click on “IDE ATA/ATAPI controllers”
8. Right click on “Primary IDE Channel” and select “Properties”.
9. Select the “Advanced Settings” tab then on the device or 1 that doesn’t have ‘device type’ greyed out select ‘none’ instead of ‘autodetect’ & click “OK”.
10. Right click on “Secondary IDE channel”, select “Properties” and repeat step 9.
11. Reboot your computer

—————————————-

* Page fault in non paged area :

Requested data was not in memory. An invalid system memory address was
referenced. Defective memory (including main memory, L2 RAM cache, video
RAM) or incompatible software (including remote control and antivirus
software) might cause this Stop message, as may other hardware problems
(e.g., incorrect SCSI termination or a flawed PCI card).

” A page fault is a signal from the CPU to the OS to let the OS know that a memory page presently not paged in must be paged in for the current process to continue. In principle it has nothing to do with memory problems”.

*Solution:

Start system in Safe Mode,

*Check the hard drive for bad sectors by running chkdsk /f /r

*Use msconfig.exe to disable what startup programs it lists. It doesn’t
list all startup locations but this would be a start. Then reboot into
normal mode to see if the problem went away or not.

Check the System log of Event Viewer for Error Reports.

Are there any yellow question marks in Device Manager? Right click on
the My Computer icon on your Desktop and select Properties,
Hardware,Device Manager. If yes what is the Device Error code?

Try Start, Run, type “sigverif.exe” without quotes and hit OK. What
drivers are listed as unsigned? Disregard those which are not checked.

—————————————-

Shutdown Windows XP Faster :

Like previous versions of windows, it takes long time to restart or shutdown windows XP when the “Exit Windows” sound is enabled. To solve this problem you must disable this useless sound.
Do the following steps to disable it:

Click Start button.

Go to settings > Control Panel > Sound, Speech and Audio devices > Sounds and Audio Devices > Sounds.

Then under program events and windows menu click on “Exit Windows” sub-menu and highlight it. Now from sounds you can select, choose “none” and then click Apply and OK.

After this check the time of shut down windows and amaizingly You will se a change in it. Its easy and useful so try it now!

—————————————-

Disable “Send an Error Report to Microsoft” Message :

In an effort to make Windows XP a better and more stable operating system, Microsoft has included Error Reporting in the latest release. Whenever an application has to close because of an error, it asks that a report be sent to Microsoft for study and evaluation. Sending the report is optional, but users can benefit from the error log that is generated if they wish to study it or print a hard copy. If you find error reporting objectionable and want it disabled:

To get rid of that pesky request from Windows XP:
.Open Control Panel.
Click on Performance and Maintenance.
Click on System.
Then click on the Advanced tab.
Click on the error-reporting button on the bottom of the windows.
Select Disable error reporting.
Click [OK] [OK]
Another Way:
[Start] [Run] [Regedit]
Registry Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PCHealth\ErrorReporting
Modify/Create the Value Name according to the Value Data listed below.
Data Type: REG_DWORD [Dword Value] // Value Name: DoReport
Value Data: [0 = Don’t Send Reports / 1 = Do Send Reports]
Exit Registry and Reboot

—————————————-

Removing old programs is easy:

From the Control Panel click on the “Add or Remove Programs” Icon. You can safely remove programs like games, demos, and other software you no longe use.

—————————————-
Turn off Windows Animations: Fancy sliding, fading and animated effects that windows uses by default can easily be turned off, and will make the reaction time of simple tasks like opening and moving windows, taskbars, etc… much faster.
From the Control Panel, click on the “System” icon. Click on the Advanced tab. Click the “Settings” button underneath “Performance”. Uncheck the options related to animations, and other unneeded visual effects.

—————————————-
Disable File Indexing:

Indexing service gets info from files on the hard drive and creates a “searchable keyword index.”
If you don’t use the XP search feature often to look for documents, you can turn this feature off, and the difference you’ll notice is a slight increase in the time it takes for your computer to find a file, but an overall increase in general speed for everything else is much better than it.
From My Computer > right-click on the C: Drive > select Properties.
Uncheck “Allow Indexing Service to index this disk for fast file searching.” Apply changes to “C: sub folders and files,” and click OK.
Clean Up Prefetch temp & cache file: Windows stores a lot of temporary files that can be safely cleaned out once a month or so. This will speed up Your Windows XP and of course You will enjoy much better speedy computer then.

—————————————-

Change Registration Information of Windows XP :

Some times when windows is fully installed then we think that we have entered the wrong or invalid registered owner information during instalation process of Windows Xp. But don’t worry now we can change the registered owner information any time, by using the technique given below whihc only requires little knowledge about editing windows registry.

Follow the given steps to change the owner name:
First click on Start button then type Regedit in Run option.
Here locate the location to:
Go to HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion
Here in right side panel, double click on RegisteredOwner and here change its value data as you wish.
Now close the registry editor and restart your computer after any changes to go into effect.
So Now it is very easy to change the name of registeration information of Windows XP owner.

—————————————-

Hide folder Without Using Any Software :

This one is really cool and pretty useful too…
Its really easy…
just follow these steps:

1.Create a new folder somewhere on your hard drive.
2.When you name it hold down “Alt” and press “0160” this will create and invisible space so it will apper as if it has no name.
3.right click it and select “Properties” select the tab “coustimize” and select “change icon” scroll along and you should a few blanc spaces click on any one and click ok and save it.
4.when you have saved the settings the folder will be invisible to hide all your personal files.

—————————————-

Protecting Document with Password :

You can protect your document by applying password so that unauthorized person can not display as well as modify your document. You can apply two types of passwords:

*Password to open the document:

If it is applied then you have to give the correct password to open the document, otherwise you cannot open the document.

*Password to modify the document:

If it is applied then you have to give the correct password to modify the document, otherwise your document is opened but you cannot modify the document. It means that your document becomes read-only.

To apply a password to document, follow these steps.

* Open Save As dialog box by selecting “Save As” command from File menu.

* Click “Tools” button of Save As dialog box and choose “General Options” from drop down menu, “Save” dialog box appears as shown in figure below.

* Enter first password in “Password to open” text box and second password in “Password to modify” text box (if required) and click “Ok” button of dialog box. Microsoft Word will open “Confirm Password” dialog box for the confirmation of passwords. The maximum length of password is 15 characters.

* Re-enter the password to open and password to modify and click “Ok” button of Confirm Password dialog boxes one by one.

* Click “Save” button of Save As dialog box.

—————————————-

How to Insert your Digital Signature into Word Documents?

As usual today I have brought a different and surprising tip for you. This tip will increase your knowledge in the field of Computer. In fact you can’t do your signature or your official work without papers. But you will be surprised to read this tips how you can insert your Digital Signature into Word Documents. Most people don’t give value that there is any technique to sign files electronically and then send via fax or email.

Follow the given steps to insert your signature electronically in Word documents:

First of all scan your signature page and then save image using (.GIF or .JPEG) extension. Now you have scanned image of you signature, save the image on your computer and note that file name where you save it.

Click on Start button, go to Program then click on Microsoft Word to run the word page.

Now go to Insert menu, click on Picture> From File then browses your scanned signature file and click Insert button to add this file in word.

If your signature is not looking so good and its size is wrong then you should rescan your signature then repeat all the steps to insert it again.

To save your signature for reuse in future documents, highlight the signature graphic, and then choose insert AutoText-New. Here a new Create Auto Text dialog box will appear. Name your signature and click ok.

Now just type the name the file of your signature and press Enter to insert your signature in the future or choose insert AutoText-Normal then click on signature name. There is no need of ink, Word jump down in your digital signature.

I think this will help you and soon I will come back with another useful tip for you.

—————————————-

How to Find Files at Yours own and sombody’s else Computer:

This tip will help you to enjoy the quick and easy way to find lost files on your computer. Here We recommends you, try to search a file with its file extensions (for example for word file, type *.doc, Excel *.xls, Acrobat *.pdf, *.ppt and *.exe for executable files. If you don’t know the name of file but know that it contains a string of text then try to search for files containing specific text, type the text you want to find from any file or folder. This is time taking process but creates very precise result. In Look in, click the drive, folder, or network you want to search. To save time, always select the specified drive or location instead of whole computer.
Click Start Button, point to Search, and then click For File or Folders, a Search Results dialog box will appear. In Search for files or folders named, type the file name or folder name you want to find in containing text.
To specify additional search criteria, click Search Options, and then click one or more of the following options to narrow your search:
Select Date to look for files that were created or modified on or between specific dates.
Select Type to look for files of a specific type, such as a text or WordPad document.
Select Size to look for files of a specific size.
Select Advanced Options to specify additional search criteria.
Click Search now.

—————————————-

Indenting Left and Right Paragraph :

The space or distance between the page margin and the text in a paragraph is called indent. These are applied to set the margins of selected paragraph.

In a document, margins determine the overall width of the main text area or in other words, the space between the text and the edge of the page. Indentation determines the distance of a paragraph from either left or right margins. There are six types of indents that can be used in a document. These are:

First line indent is the distance between the first line of the paragraph and the left margin.

Left indent is the distance between the start of each line of the paragraph and the left margin.

Right indent is the distance between the end of each line of the paragraph and the right margin.

In hanging indent, the first line of the paragraph is not indented and all other lines start at same distance from the left margin. The first line ‘of the paragraph usually starts from the left margin.

To indent a paragraph, follow these steps.

Select the Paragraph you want to indent.

Select the “Paragraph” command from “Format” drop down menu; “Paragraph” dialog box appears.

Specify values in Left and Right fields of indentation and click “Ok” button of dialog box.

—————————————-

How to Increase the Recording Time of Windows Sound Recorder:

The default time limit for recording in the Windows Sound Recorder utility is one (1) minute.To increase Sound Recorder’s time limit, you need to follow this (somewhat tedious) procedure. Open Sound Recorder and click on the Record button. Let it record for a period of one minute until it stops. Now click on File > Save and save the file as Blank.wav. Next, click on Edit > Insert File… and insert the blank.wav fileyou just created. You will see that the recording time limit increases by one minute. In this way, if you wish to increase it to 15 minutes, insert this file 15 times. If you wish to make 15 minutes as the default recording length, do these steps:

Save the file you created in the previous step (this will be a 15-minute blank WAV file).
Go to Start > All Programs > Accessories > Entertainment, right-click on Sound Recorder,and click Properties. In the Target box, you will see
“%SystemRoot%\ system32\sndrec32.exe”; change it to “%SystemRoot%\ system32\ sndrec32.exe C:\Sound\blank.wav”(without the quotes),
assuming you saved the blank.wav file to C:\Sound. When you start Sound Recorder the next time, this file will open automatically. After recording your audio, you can click on Edit > Delete After Current Position to remove the blank space after the recording is done. Don’t forget to save this newly-recorded file with a new filename, because if you accidentally overwrite the blank.wav file, the recording limit will become equal to the time for which you just recorded the audio. So in this way you can increase the recording time of windows default recording.

—————————————-

Media Files:

Do not store media files like mp3, dat, ram, wmv etc Audio and Video Files in the Windows XP drive i.e. C-Drive. Use other hard disk drives for storing media files.

—————————————-

Turn of Auto Run Music CD’s :

How can you stop windows XP from launching program CDs automatically?

Click Start, click Run, type GPEDIT.MSC to open Group Policy in the Microsoft Management Console.

Double-click Computer Configuration, double-click Administrative templates, double-click System, and then click Turn off autoplay.

The instructions on your screen describe how to configure this setting. Click Properties to display the setting dialog.

Click Enabled, and choose CD-ROM drives, then click OK, to stop CD autoplay.

Note: This setting does not prevent Autoplay for music CDs.

—————————————-

Windows Xp Shortcus :

Getting used to using your keyboard exclusively and leaving your mouse behind will make you much more efficient at performing any task on any Windows system.
You can use the following keyboard shortcuts every day:
Windows key + R = Run menu
This is usually followed by:
cmd = Command Prompt
iexplore + “web address” = Internet Explorer
compmgmt.msc = Computer Management
dhcpmgmt.msc = DHCP Management
dnsmgmt.msc = DNS Management
services.msc = Services
eventvwr = Event Viewer
dsa.msc = Active Directory Users and Computers
dssite.msc = Active Directory Sites and Services
Windows key + E = Explorer
ALT + Tab = Switch between windows
ALT, Space, X = Maximize window
CTRL + Shift + Esc = Task Manager
Windows key + Break = System properties
Windows key + F = Search
Windows key + D = Hide/Display all windows
[Alt] and [Esc] Switch between running applications
[Alt] and letter Select menu item by underlined letter
[Ctrl] and [Esc] Open Program Menu
[Ctrl] and [F4] Close active document or group windows (does not work with some applications)
[Alt] and [F4] Quit active application or close current window
[Alt] and [-] Open Control menu for active document
Ctrl] Lft., Rt. arrow Move cursor forward or back one word
Ctrl] Up, Down arrow Move cursor forward or back one paragraph
[F1] Open Help for active application
Windows+M Minimize all open windows
Shift+Windows+M Undo minimize all open windows
Windows+F1 Open Windows Help
Windows+Tab Cycle through the Taskbar buttons
Windows+Break Open the System Properties dialog box
Explorer Shortcuts:
END……. Display the bottom of the active window.
HOME……. Display the top of the active window.
NUM LOCK+ASTERISK……. on numeric keypad (*) Display all subfolders under the selected folder.
NUM LOCK+PLUS SIGN……. on numeric keypad (+) Display the contents of the selected folder.
NUM LOCK+MINUS SIGN……. on numeric keypad (-) Collapse the selected folder.
LEFT ARROW…… Collapse current selection if it’s expanded or select parent folder.
RIGHT ARROW……. Display current selection if it’s collapsed, or select first subfolder.
Type the following commands in your Run Box:
(Windows Key + R) or Start Run
devmgmt.msc = Device Manager
msinfo32 = System Information
cleanmgr = Disk Cleanup
ntbackup = Backup or Restore Wizard (Windows Backup Utility)
mmc = Microsoft Management Console
excel = Microsoft Excel (If Installed)
msaccess = Microsoft Access (If Installed)
powerpnt = Microsoft PowerPoint (If Installed)
winword = Microsoft Word (If Installed)
frontpg = Microsoft FrontPage (If Installed)
notepad = Notepad
wordpad = WordPad
calc = Calculator
msmsgs = Windows Messenger
mspaint = Microsoft Paint
wmplayer = Windows Media Player
rstrui = System Restore
netscp6 = Netscape 6.x
netscp = Netscape 7.x
netscape = Netscape 4.x
waol = America Online
control = Opens the Control Panel
control printers = Opens the Printers Dialog
Shortcuts For Windows XP:
Copy. CTRL+C
Cut. CTRL+X
Paste. CTRL+V
Undo. CTRL+Z
Delete. DELETE
Delete selected item permanently without placing the item in the Recycle Bin. SHIFT+DELETE
Copy selected item. CTRL while dragging an item
Create shortcut to selected item. CTRL+SHIFT while dragging an item
Rename selected item. F2
Move the insertion point to the beginning of the next word. CTRL+RIGHT ARROW
Move the insertion point to the beginning of the previous word. CTRL+LEFT ARROW
Move the insertion point to the beginning of the next paragraph. CTRL+DOWN ARROW
Move the insertion point to the beginning of the previous paragraph. CTRL+UP ARROW
Highlight a block of text. CTRL+SHIFT with any of the arrow keys
Select more than one item in a window or on the desktop, or select text within a document. SHIFT with any of the arrow keys
Select all. CTRL+A
Search for a file or folder. F3
View properties for the selected item. ALT+ENTER
Close the active item, or quit the active program. ALT+F4
Open the shortcut menu for the active window using ALT+SPACEBAR
Close the active document in programs that allow you to have multiple documents open simultaneously. CTRL+F4
Switch between open items. ALT+TAB
Cycle through items in the order they were opened. ALT+ESC
Cycle through screen elements in a window or on the desktop. F6
Display the Address bar list in My Computer or Windows Explorer. F4
Display the shortcut menu for the selected item. SHIFT+F10
Display the System menu for the active window. ALT+SPACEBAR
Display the Start menu. CTRL+ESC
Display the corresponding menu. ALT+Underlined letter in a menu name
Carry out the corresponding command. Underlined letter in a command name on an open menu
Activate the menu bar in the active program. F10
Open the next menu to the right, or open a submenu. RIGHT ARROW
Open the next menu to the left, or close a submenu. LEFT ARROW
Refresh the active window. F5
View the folder one level up in My Computer or Windows Explorer. BACKSPACE
Cancel the current task. ESC
SHIFT when you insert a CD into the CD-ROM drive Prevent the CD from automatically playing.
Use these keyboard shortcuts for dialog boxes:
Move forward through tabs. CTRL+TAB
Move backward through tabs. CTRL+SHIFT+TAB
Move forward through options. TAB
Move backward through options. SHIFT+TAB
Carry out the corresponding command or select the corresponding option. ALT+Underlined letter
Carry out the command for the active option or button. ENTER
Select or clear the check box if the active option is a check box. SPACEBAR
Select a button if the active option is a group of option buttons. Arrow keys
Display Help. F1
Display the items in the active list. F4
Open a folder one level up if a folder is selected in the Save As or Open dialog box. BACKSPACEDisplay or hide the Start menu. WIN Key
Display the System Properties dialog box. WIN Key+BREAK
Show the desktop. WIN Key+D
Minimize all windows. WIN Key+M
Restores minimized windows. WIN Key+Shift+M
Open My Computer. WIN Key+E
Search for a file or folder. WIN Key+F
Search for computers. CTRL+WIN Key+F
Display Windows Help. WIN Key+F1
Lock your computer if you are connected to a network domain, or switch users if you are not connected to a network domain. WIN Key+ L
Open the Run dialog box. WIN Key+R
Open Utility Manager. WIN Key+U

—————————————-

How to start windows programs quickly with Run Command?

The run option of Start menu is used to run a program or to open a document directly. If you do not know the exact location of the program or document then click on Start button to open Run and type the programs shortcut name to open it directly.

Run Commands

appwiz.cpl — Used to run Add/Remove wizard

Calc –Calculator

Cfgwiz32 –ISDN Configuration Wizard

Charmap –Character Map

Chkdisk –Repair damaged files

Cleanmgr –Cleans up hard drives

Clipbrd –Windows Clipboard viewer

Control –Displays Control Panel

Cmd –Opens a new Command Window

Control mouse –Used to control mouse properties

Dcomcnfg –DCOM user security

Debug –Assembly language programming tool

Defrag –Defragmentation tool

Drwatson –Records programs crash & snapshots

Dxdiag –DirectX Diagnostic Utility

Explorer –Windows Explorer

Fontview –Graphical font viewer

Fsmgmt.msc — Used to open shared folders

Firewall.cpl — Used to configure windows firewall

Ftp -ftp.exe program

Hostname –Returns Computer’s name

Hdwwiz.cpl — Used to run Add Hardware wizard

Ipconfig –Displays IP configuration for all network adapters

Logoff — Used to logoff the computer

MMC –Microsoft Management Console

Msconfig –Configuration to edit startup files

Mstsc — Used to access remote desktop

Mrc — Malicious Software Removal Tool

Msinfo32 –Microsoft System Information Utility

Nbtstat –Displays stats and current connections using NetBIOS over TCP/IP

Netstat –Displays all active network connections

Nslookup–Returns your local DNS server

Osk —Used to access on screen keyboard

Perfmon.msc — Used to configure the performance of Monitor.

Ping –Sends data to a specified host/IP

Powercfg.cpl — Used to configure power option

Regedit –Registry Editor

Regwiz — Registration wizard

Sfc /scannow — System File Checker

Sndrec32 –Sound Recorder

Shutdown — Used to shutdown the windows

Spider — Used to open spider solitaire card game

Sfc / scannow — Used to run system file checker utility.

Sndvol32 –Volume control for soundcard

Sysedit — Edit system startup files

Taskmgr –Task manager

Telephon.cpl — Used to configure modem options.

Telnet –Telnet program

Tracert –Traces and displays all paths required to reach an internet host

Winchat — Used to chat with Microsoft

Wmplayer — Used to run Windows Media player

Wab — Used to open Windows address Book.

WinWord — Used to open Microsoft word

Winipcfg –Displays IP configuration

Winver — Used to check Windows Version

Wupdmgr –Takes you to Microsoft Windows Update

Write — Used to open WordPad

—————————————-

s

Windows Media Player Keyboard Shortcuts :

In Windows Media Player, We can use the combination of different keyboard keys to accomplish routine task. By using these keys, we can increase the working speed in media player, otherwise require a conventional mouse to select menus and buttons options. Basically keyboard shortcuts keys help you to save time and we can perform any tasks without leaving the keyboard keys.
Here are windows media player keyboard shortcuts:
ALT+1 Adjust zoom to 50 percent
ALT+2 Adjust zoom to 100 percent
ALT+3 Adjust zoom to 200 percent
ALT+ENTER Display the video in full mode
ALT+F Go to media player File Menu
ALT+T Go to media player Tools Menu
ALT+V Go to media player View Menu
ALT+P Go to media player Play Menu
ALT+F4 Use to close media player
CTRL+1 Display media player in full mode
CTRL+2 Display media player in skin mode
CTRL+B Use to play the previous item in media player
CTRL+F Use to play the next item in media player
CTRL+E Use to Eject CD or DVD from CD or DVD drive
CTRL+P Use to Play or Pause the item in media player
CTRL+T Use to repeat the items in media player
CTRL+SHIFT+B Use to Rewind a file in media player
CTRL+SHIFT+F Use to Fast Forward a file in media player
CTRL+SHIFT+S Use to play items slower than a normal speed
CTRL+SHIFT+ G Use to play items faster than a normal speed
CTRL+SHIFT+ N Use to play items at normal speed in media player
F8 Use to mute the volume in media player
F9 Use to decrease the volume in media player
F10 Use to increase the volume in media player
ENTER or SPACEBAR Use to play an item

—————————————-

Google Talk Shortcuts OR Google Talk Hotkeys :

Tab – It is giving the area to each of the windows opened by Google Talk.
Ctrl + Tab – The same thing does that Shift + Tab .
Shift + Tab – The same thing does that Tab but in reverse.
Ctrl + E – It centralizes the selected text, or the current line.
Ctrl + R – It justifies to the right the selected text, or the current line.
Ctrl + L – It justifies to the left the selected text, or the current line.
Ctrl + I – The same thing does that Tab.
Ctrl + Shift + L -Switch between points, numbers, letters, capital letters, roman numbers and capital roman numbers
Ctrl + 1 (KeyPad) – It does a simple space between the lines.
Ctrl + 2 (KeyPad) – It does a double space between the lines.
Ctrl + 5 (KeyPad) – A space does 1.5 between the lines
.Ctrl + 1 (NumPad) – It goes at the end of the last line.
Ctrl + 7 (NumPad) – It goes at the begin of the last line.
Ctrl + F4 – It closes the current window.
Alt + F4 – It closes the current window.
Alt + Esc – It Minimize all the windows.
F9 – Open Gmail to send an email to the current contact.
F11 – It initiates a telephonic call with your friend.
F12 – It cancels a telephonic call.
Esc – It closes the current window.
Windows + ESC – And will open Google Talk if it is minimized, or in the tray.

—————————————-

Change Your Yahoo Messenger to Multi Messenger

Following these steps You will be able to login with multiple ID’s on the same yahoo messenger.

Here are the steps to follow:
* Go to Start –> Run –> Type regedit,hit enter
* Go to HKEY_CURRENT_USER –> Software–> Yahoo –> pager –>Test
* On the right pane –> right-click and choose new Dword value .
* Rename it as Plural.
* Double click and assign a decimal value of 1.
* Now close registry and restart yahoo messenger.
* For signing in with new id open another messenger .
And after restarting Yours computer You will be able to use yahoo messenger as multi yahoo messenger.

—————————————-

Useful Microsoft Outlook Shortcut keys :

Ctrl+A Apply to select all

Ctrl+B Apply/Remove bold formatting

Ctrl+C Apply to copy the selected word

Ctrl+D Apply to delete any active item

Ctrl+E Move cursor to Look for box

Ctrl+F Display the Find what /Forward selected email

Ctrl+G Apply to run Go to dialog box under calendar view

Ctrl+I Apply/Remove Italic formatting

Ctrl+J Apply to open selected items

Ctrl+M Press keys to create new message

—————————————-

Mozilla Firefox Keyboard Shortcuts :

Functional Keys for Mozilla Firefox:
F1 Opens Firefox help
F3 Find more text within the same webpage
F5 Reload the current webpage
F6 Toggles the cursor between the address/URL input box and the current webpage
F7 Toggles Caret Browsing on and off. Used to be able to select text on a webpage with the keyboard
F11 Switch to Full Screen mode
Other Keyboard Shortcuts for Mozilla Firefox:
CTRL + A Select all text on a webpage
CTRL + B Open the Bookmarks sidebar
CTRL + C Copy the selected text to the Windows clipboard
CTRL + D Bookmark the current webpage
CTRL + F Find text within the current webpage
CTRL + G Find more text within the same webpage
CTRL + H Opens the webpage History sidebar
CTRL + I Open the Bookmarks sidebar
CTRL + J Opens the Download Dialogue Box
CTRL + K Places the cursor in the Web Search box ready to type your search
CTRL + L Places the cursor into the URL box ready to type a website address
CTRL + M Opens your mail program (if you have one) to create a new email message
CTRL + N Opens a new Firefox window
CTRL + O Open a local file
CTRL + P Print the current webpage
CTRL + R Reloads the current webpage
CTRL + S Save the current webpage on your PC
CTRL + T Opens a new Firefox Tab
CTRL + U View the page source of the current webpage
CTRL + V Paste the contents of the Windows clipboard
CTRL + W Closes the current Firefox Tab or Window (if more than one tab is open)
CTRL + X Cut the selected text
CTRL + Z Undo the last action

Posted September 19, 2010 by PrashanthChindam in System