Search This Blog

Saturday, July 30, 2011

What is mscorsvw.exe and why is it eating up my CPU?


If you like this article, please click on +1 button and share with your friends.

You can find a lot of Video Tutorial at our site.
visit www.iGnani.com


Today, I suddenly found my system too very slow and most of the apps where hanging. When I checked the tasks manager, found that “mscorsvw.exe” was consuming more than 50% of the processor while my anti-virus was consuming another 30%+ which was making my system to become very sluggish.

The first thing that came to my mind when I saw anti-virus software consuming so much was that “mscorsvw.exe might be some virus” which somehow entered my system and anti-virus was trying to clean it up. But this thing went on for more than 15 min which made me worried. Did not want to find myself in the situation where I lose all my data. That is when I tried to do some research and to my surprise, the mscorsvw.exe was a tool that comes with .net framework and anti-virus was also processing to check that the output from this file.

Monday, July 25, 2011

is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)


If you like this article, please click on +1 button and share with your friends.

Click here for the Video Tutorial of this article.
visit www.iGnani.com


Error:

Today I faced a very strange problem. While working on my project, at one point where my code was calling a method from the same class I got this error.

is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)

I can say confidently that I took this project from another development and there the code executed without any issues. Here, when I tried to call a particular method, without even entering the method, it used to throw the above error.



Wednesday, July 20, 2011

SQL Server: Remove trailing Zeros in a number


If you like this article, please click on +1 button and share with your friends.

visit www.iGnani.com


I faced this problem in one of my projects where I had to remove the trailing zeros from the data that I received from the database before presenting it to the user. In my case, the database was designed to store numeric value with 20 digits to the right of the decimal and most of the time it used be zeros. While I could not use the round() or any other method since I had to display the values exactly, but not if they were zeros. Consider the below example:

Sunday, July 17, 2011

How-To: Using BindingNavigator & BindingSource


If you like this article, please click on +1 button and share with your friends.

Click here for the Video Tutorial of this article.
visit www.iGnani.com


How to - Steps to complete the exercise:

You can see this How-To article in action in this video:



  • First we Create a Windows Form.
  • Then we add BindingNavigator & Other Controls onto the form.
  • We follow it with Creating a Data Source using Data Source Configuration Wizard.
  • Finally, we Bind the Controls on the form to the BindingSource.

You can find a more details on BindingSource and BindingNavigator on our Blog. Please feel free to look at them for a better understanding of this article.

We will be using Visual Studio .net 2010 for our demo.

Creating the form with controls on them

Open Visual Studio .net 2010, create a Windows Form project.

Let us go ahead and add a “Windows Form” to our project. To add a form, go to the Solution Explorer, right click on the Project. From the shortcut menu that opens up, select Add and then select Windows Form. This shows up a Add New Item window. Let us give our form a Name. I will call it as “BindingNavigatorDemo.cs”. After that click on the Add button. This will add a windows form onto our project. The windows form is now ready and you can see it in the design mode on your screen.

Now let us add some controls onto the form. In the demo, I will be working with three fields from the table “Employee” of “AdventureWorks2008” SQL Server database.

Saturday, July 9, 2011

Random number generation in VB.net


If you like this article, please click on +1 button and share with your friends.

Click here for the Video Tutorial of this article.
visit www.iGnani.com


The Random class defined in the .NET Framework class library provides functionality to generate random numbers.

The Random class constructors have two overloaded forms. It takes either no value or it takes a seed value.

In the NoSeedRandom method below, I am using the Random object without a Seed. A Seed is a number used to calculate a starting value for the pseudo-random number sequence. If a negative number is specified, the absolute value of the number is used.

In the next three methods, I am using the Random object first with Seed, next with Seed and Upper limit in case you want the number to be generated within the upper limit specified. And the last method with Seed and both Upper and lower limit, to make sure we get the random number within a range.

Generating a GUID - C#

If you like this article, please click on +1 button and share with your friends.

Click here for the Video Tutorial of this article.

 

GUID stands for Globally Unique IDentifier. It is a string of numbers and/or letters that is unique. It is a unique identifier, that means that as per the claims by Microsoft, this ID whenever you generate, will be unique and its practically impossible to generate the same number again or being duplicated. GUIDs can be used for various purposes. You can use a GUID as a primary key in your database table in case you have many databases scattered around and you would want to sync the records

Shortcut Keys for Microsoft Word – Do away with Mouse

If you like this article, please click on +1 button and share with your friends.

 

Click here for the Video Tutorial of this article.

visit www.iGnani.com

 

Shortcut key

Description

Press Shift+Right Arrow Select text towards right
Press Shift+ Left Arrow Select text towards left
Press Shift +Up Arrow Select text towards up
Press Shift +Down Arrow Select text towards down
Press Shift+Ctrl+Arrow Select one word at a time
Press Shift+End Select the text till the end of the line
Press Shift+Home Select the text till the beginning of the line