Wednesday, August 08, 2007

Hi,
If you want to disable the right click option in the browser, include the following lines of code in the header portion of the page.
<SCRIPT>
function noRightClick()
{

if (event.button == 2)
{
alert("Right Click Not Allowed!");
return false;
}

}
document.onmousedown = noRightClick
</SCRIPT>

Regards,
Sasikumar
Protecting your SAM Database


How to I protect my system. How to make my PC more secure on windows environment there are few common way we can protect our PC

By setting the BIOS password.
By Setting Windows password
By using system Hardware key


By using SYSKEY Utility.

I know most of will know the first 3 way of protecting and the fourth is quite different. Even thought SYSKEY Utility. is part of our OS we are not used to it . Let me explain about it .first we will know where this SYSKEY Utility resides inside our OS it’s in C:\WINDOWS\system32 folder. This utility is used to protect the System Account Manager Database (SAM) to run this utility go to run and type syskey




Fig1
The SYSKEY Utility will open now



Fig 2

Ok what is SAM what it does, this is the place where the OS will maintain the system username and password in encrypted format, now what the SYSKEY utility will do . it will move the decryption key to the floppy disk so that if you put the Floppy disk, only the system will open . Lets explain what’s there in the fig 2 here we have the Encryption Disabled and Encryption Enabled.

When you select the Encryption Disabled it will not encrypt the syskey if you select Encryption Enabled it will encrypt. After that clink the update button




Fig 3
In this screen we have the two options first the password setup which the user can give for their own or else we can select the system generated password. Again here we have the two way of storing the password. When you select the store startup key on floppy disk. The encrypted key will be stored in the floppy or if you select the store startup key locally it will be stored in the local system itself. This one of the most secure way to protect your system the data.







Wednesday, July 18, 2007

Trciks to play Minesweeper Game.

Press X, Y, Z, Z, Y, Shift +Enter, Enter


Now open the Minesweeper and watch the Top Left Corner of the screen and move your mouse cursor over the mine in the game. If there is no boom the Top Left Corner pixel will be set to 1 or else it will be set to 0 so you can see the difference in the Top Left Corner pixel. Based on this you can easily finish the game

Monday, July 16, 2007

Enabling Arabic in SQL server /Arabic is not recognized in SQL server it displays as “???????”.i had seen may query like this in many discussion group and I had also faced the same problem .These are the few tips which I had followed to solve the problem

Solution 1:
Set the collation for the field to Arabic while creating the table

How do I change the collation for the existing table?

ALTER TABLE #studrelation ALTER COLUMN stu_rela_code
Nvarchar(100) COLLATE Arabic_CI_AS NOT NULL



Here Arabic_CI_AS

Arabic – Language which you need
CI/CS - Case Insensitive / Case Sensitive
AS/KS/WS - Accent sensitivity/ Kana Sensitivity/ Width sensitivity


Solution 2:

Arabic will be recognized only with data type Nvarchar, text if you insert in varchar data type it won’t work.

CREATE TABLE #studrelation
( stud_id int,
stu_rela_code Nvarchar(100)
)
Insert into #studrelation(stud_id,stu_rela_code)values(1,'رسوم كتب')

select * from studrelation where stu_rela_code like N'%رسوم كتب%'

Friday, July 13, 2007

In this we will learn about the WinCV tool, I am going to give just a short summary about WinCV and its usage and how to use this tool more effectively for the programming

Before learning about the WinCV tool we will learn the real scenario

Many times while programming, will be blinking before the monitor without knowing the proper object or class available , then what’s the next step only Google its it right. How it will be if we have a tool that will allow you search for class the objects in the .net library yes we have the inbuilt tool called WinCV.exe which is available at C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin, just you can open the tool and type the class or object which you need to find out it will list out all the content the assembly name, field, Constructors, Properties, Events, Methods

Ok Then what to do if we have our own assembly and how to browse the objects in that .There is a web configuration file called WinCV.exe in the same location you can edit the configuration file and add your assembly in the tag [] then you can browse your assembly.

Saturday, June 30, 2007

This kind of error will occur in crystal report when you export the report to any other format. For example from “.rpt” to “.pdf” /”.doc” like that. The error message will be like this

Problem:

Invalid export DLL or Export Format

Cause /Reason:
The problem is in the export dll used in the crystal report.. since its not properly registered this problem will occur

Solution:
Uninstall the acrobat reader and reinstall it this problem will be solved
Some time we may face the Error While we load the Crystal report in the application . the error message which we will face is

Problem:
Error : Load Report failed

Cause /Reason:
When the report file (.rpt file) is not in the Specific path which you had mention in the application this error will occur

Solution:
Place the specific .rpt file in the path specified.

Friday, June 29, 2007



Regional Settings for IIS

Some time we may get problem in language or the numeric/ date time format while you deployed an asp.net application or in the development itself.

Problem:
The problem is in the date time format that your system displays. Actually the date should be in “dd/MM/yyyy” format but it displays as “dd-MM-yyyy” or some other format. Even though you try by setting the regional setting also its wont work. But the same application works in another server / PC with “dd/MM/yyyy” format and the month name is also displaying in Different language .

Cause:

In the Globalization attribute in the machine.config file if the culture if not set this problem arise. You can find the configuration file in “C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG” this location

Solution:

Give the culture name the Globalization attribute


So the asp.net application will take the regional settings from the machine.Config file. Here I had set to US English you can set to any other language format if you need.

Note: This setting is for all the application deployed in that IIS Server

Thursday, June 07, 2007

Weather Microsoft is watching your system. Don’t they have any other work than that. “wpa.dbl “.WPA stands for Windows Product Activation for Windows XP and above version of Microsoft OS is using the wpa.dbl file to activate the product. There are lot of rumours that, by using this file Microsoft is going to watch your activities. Ya its may be true but not all your personal activities ,it will check for the OS license only . Ok how MS is going to check the license, weather they are going to take my H/W info. Yes they are, there are few listed H/W which they are going to check they are

NIC & MAC address
HDD Serial Number
processor number
Display Adapter
SCSI Adapter
IDE Adapter (effectively the motherboard)
RAM Amount Range (i.e., 0-64mb, 64-128mb, etc.)
Processor Type
CD-ROM / CD-RW / DVD-ROM

The “wpa.dbl “ is going to have the info of the above said H/W. Then What its does? Every time you boot you system the OS will check the H/W serial number with the number in the “wpa.dbl “ file, if your version of OS pass 7 checks then only your OS will be considered as licensed one. If else you can all MS through phone and you can activate it

What happen when I change the H/W?
If you change 1 or 2 H/W there is no problem if the OS passes less then 7 checks then you want to reactivate your OS through phone call. So this what “wpa.dbl “file is going to do in your system

Wednesday, May 30, 2007

Here is the code to add the controls dynamically to the form and to generate events for the generated controls .the code is an C# code

private void Form1_Load(object sender, System.EventArgs e)
{
int y=16,x=72;
for (int i=1; i<=5;i++) { btn=new Button();
panel1.Controls.Add(btn);
btn.Location=new System.Drawing.Point(x, y);
btn.Text ="Button"+i.ToString();
y=y+30;
btn.Click+=new EventHandler(btn_Click);
}
}

private void btn_Click(object sender, EventArgs e)
{
Button bt=(Button)sender;
MessageBox.Show(bt.Text);

}

Code description

Create a new instance for the button object btn=new Button(); then add the object to the form or panel here I am using panel to place the button control. Then the event is generated in the look it self. The btn_Click event is for the generated buttons.