Tuesday, July 31, 2012

Speed up Windows XP Quickly

After installing windows XP, we install programs, do work in program, browse internet etc.  After sometime it becomes slower, we sit and wait to load Windows XP and other software. To resolve this I am providing some Tips & tricks for educational purpose only. I am not good at English so pardon me for this.

For better results, this should be followed step by step in order.

1 Desktop Background
2 Remove program that no longer in use.
3 Remove unwanted fonts
4 Remove unnecessary program from running at computer start up
5 Disable unnecessary services running at startup
6 Delete temporary file and internet cache files
7 Defragment


1. Desktop Background
You will think that what is in desktop background picture. We set some pictures as desktop wallpaper which constantly consumes memory. During work we maximize, minimize our program window, XP refresh desktop content all that time.  You can use low resolution picture as wallpaper, I prefer to use only set particular colour as a background i.e. black.


How to: right click on desktop’s blank space and select Properties from popup menu. Click on Desktop tab and change background or remove it. Click ok to finish.

2.  Remove program that no longer in use.
Installing games, programs may affect your computer performance. So uninstall programs/games you don’t use.


How to: Click Start -> Run and enter “appwiz.cpl” or navigate to Control Panel, open Add or Remove Program.  Select unwanted program and click on Change/Remove Button. If you are not sure about program by looking its name in Add/Remove Program list, don’t uninstall it. Some drivers & other utilities might confuse.

3. Remove unwanted fonts.
TTF fonts acquire your system resource.  Having more than 500 fonts can slow down your program starting process, especially office programs. Remove fonts which you don’t use on daily basis.


How to:  Start-> Run. Type “Fonts” or navigate to Control Panel and open Fonts. Remove unnecessary / unwanted fonts from there.

Warning: Before removing any fonts take a backup of it to another temporary folder. And don’t try with system fonts. (Arial, Courier, Georgia, Sans-serif, Times, Verdana etc.)

4. Remove unnecessary program from running at computer start up
We download and install many programs along with drivers and other utilities.  Some of them start up itself with computer. It may be driver’s utility, auto update program, desktop widgets etc. they consumes our memory and slow down our computer start up. If we stop them from running at start up it will not make trouble to its functionality/execution.


How to:  Removing program from start up is intimidating. Because it stores values at many place i.e. start up folder, registry and services etc.
First look at your Start up Folder at Start Button->Programs -> Start up. Delete program from there you don’t want to run at System start up. (it only deletes program start up, not actual program, you can move it back to anytime.
Click start button -> Run type "msconfig” and press ok. This will bring System Configuration Utility. Click on Start “Startup” tab. It will shows list of startup program, uncheck the box against the program which you want to remove from startup.

For advance check, open Registry editor by Clicking Start Button-> Run and typing “regedit”. Navigate these two keys HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, and expand path as:

<*key name>\Software\Microsoft\Windows\CurrentVersion\Run

* HKEY_CURRENT_USER/HKEY_LOCAL_MACHINE at both keys.

After selecting/clicking on Run key right hand pan will show startup programs if exists. Just select key and press delete key to remove program from startup.

5 Disable un-necessary services running at startup.
Services run constantly in background. It helps operating system and other applications during computer stay on. Not all services are required to run at startup.


How to: we can disable them from doing this.
Open Services Management by Start->Run type “services.msc” or go to control panel->administrative tools->services.

To disable any service right click on it and select Properties. Select Disable under label “Startup Type”. The best way is to set “Manual” here. Because we don’t know which program uses which service. By setting “Manual” we guide OS to run it when required.
Some services which you can disable safely.

Services
Comments
Application Layer Gateway really not very useful for home users.
Automatic Updates leave It as it is if you want to stay updated.
Help and Support not that much useful.
Print Spooler disable it if you are not using printer.
Remote Registry -
Task Scheduler disable it if you don’t have added scheduled task.
Web Client: -
Windows Time Disable it if you don’t need to synchronize your pc clock with Windows Time Server.
Wireless Zero Configuration disable it if you are not using  802.11 devices.
Workstation disable if you are not sharing file/folder to your network.

6. Delete temporary file and internet cache files
We install – uninstall program, work on pc, browse on internet, with this windows creates lots of temporary files on hard disk.  This should be removed at least once a month.


How to: Navigate to user’s temp folder by clicking Start->Run and type “%temp%”. select all files and folder and press Delete key. If some files are not deleting leave it, they are in use by other application which are currently running. Same way navigate to “C:\Windows\Temp” and delete all file and folders there.

Different web browser can store cookies, history, temp files at different location. Best way to do this is to  open that browse and navigate to it’s option/settings, and clear history from there.

Other best way is to use CCcleaner. CCleaner is a powerful FREE tool that can do this task for you, it also remove waste data that clutters your computer.  In order to download CCleaner go to www.piriform.com/CCLEANER and download the free version. CCleaner removes all of the excess junk that takes up space on your computer such as history files, cookies and files in the recycling bin.

7 Defragment:
Hard disk fragments slow down performance of computer. It’s little complicated but for our understanding we arrange files in a manner that OS can read it quickly than fragmented state. You should run Disk Defragmenter at least once a month. It also requires when we install huge games, programs, uninstall some programs.


How to: open My Computer and right click on relevant drive letter. Now select properties, click on the tools button and click Defragment Now.  The process of Defragmenting your hard drive can take anywhere from a couple of minutes to several hours depending on the severity of your hard drive fragmentation.  It will store all files end to end, without any fragmentation, so after running defragmentation reading and writing to the disk will speeds up. These are just a few small things you can do to speed up the performance of Windows XP! Give it a try and you will be surprised what a difference a few small steps makes!

Thursday, April 12, 2012

C# pass data/value between forms.




This method pass parameter from one form to another when user clicks OK.

First create property in Second Form, which we want to pass parameter to calling form

Place your cursor below the Form Class.(e.g. public partial class Form2:Form)

Create variable to hold property value.

private strting strString;
//create property
public string strRetVal
{
get{return strString;}
set{strString=value;}//value is predefined keyword, it will automatically assign value to strString from the code.

}


Now click on Form's OK button click event.

//assign value to private strString variable.
strString="ABC" //or any value you are getting from your code i.e. textbox1.text

Now move to Form1

Show Form2 as a ShowDialog

if (form2.ShowDialog() == DialogResult.OK)
{
string strReturnedValue=form2.strRetVal; //Access form2's property.

}