Tips & Tricks

146 posts

Peek, Snap, and Shake: Windows 7 new features

Peek, Snap, and Shake are three interesting, fun, and useful features in Windows 7. Peek If you have multiple windows open, when you move your mouse over the icon of an application at the taskbar, a small thumbnail window will popup to let you peek the actual window before maximizing or switching to it. What is more, when you move your mouse over the thumbnail window, a “X” button will appear at the right top […]

SQL Server Express 2008 setup error on Windows 7: Invoke or BeginInvoke cannot be called on a control until the window handle has been created

I got this error today when I tried to install SQL Server Express 2008 Service Pack 1 on Windows 7: “SQL Server Setup error: Invoke or BeginInvoke cannot be called on a control until the window handle has been created” It is a bug according to this post. The fix is simple: close the dialog and then rerun the installer.

Debugging Visual Studio 2005 project on 64-bit IIS 6 in Windows XP x64

If you are using Windows XP x64 and if you use Visual Studio 2005 to create a virtual directory on local 64-bit IIS as shown in the following screen shot: and you may get an error message like this: Unable to create the virtual directory. Configuring the virtual directory for ASP.NET 2.0 failed. You may need to manually configure this site for ASP.NET 2.0 in order for your site to run correctly. The root cause […]

How to fix System.Data.OracleClient BadImageFormatException error

[UPDATE]: The fix in this post may not work on Windows Vista/7  64-bit operating system, if you are using Vista/7 and have the problem specified in this post, then check out the updated post here: https://learningpenguin.net/index.php/2010/08/13/update-how-to-fix-system-data-oracleclient-badimageformatexception-error/ If you use Microsoft’s OracleClient libraries to connect Oracle database in .NET application, you may encounter BadImageFormatException error if the application is running on a x64 machine. The actual error message shows as follows: [InvalidOperationException: Attempt to load Oracle […]

How to install Windows Live Essentials on XP x64?

***NOTE: The method introduced in this post only applies if you want to install Windows Live Essentials on a XP x64 computer.*** According to the system requirements of Windows Live Essentials, Windows XP x64 is not on the supported operating system list. If you search the Internet, you will find many posts talking about how to install Windows Live on XP x64, but most of them will tell you to download some MSI files from […]

Where are the installer files for Windows Live Essentials?

When you download Windows Live Essentials from its official website, you will get a web installer file, and this installer will download and install the individual components based on your choice. You may wonder if there is an installer for each individual component in Windows Live Essentials? If yes, then where are they saved in your computer? After you install Windows Live Essentials on you computer, you can find the downloaded installers in the following […]

How to save an embedded picture in Outlook 2007

You may have noticed that in Microsoft Outlook 2007 there is no option for you to save an embedded picture in an email. If you right-click the embedded picture, you will only get a “Copy” option. So how to save the embedded picture in Outlook 2007? Here are some ways I found: Method 1 – easy but not so attractive 1. Double-click the message to load it in a separate window. 2. Expand “Other Actions” […]

Configure IIS 7 to work with Visual Studio 2008 in Windows 7

You should install IIS 7 prior to the installation of Visual Studio 2008, otherwise, you will need to run command aspnet_regiis –i with administrator permission. If you install IIS 7 with the default settings, you will get this error when you try to use local IIS instead of the built-in web server in VS 2008, or when you try to create a new web site project on local IIS instead of using the file system. […]

Conditionally validate form by using ASP.NET validators and JavaScript

It is a common requirement to validate different fields on an ASP.NET form based on different conditions, for instance, if user selects “Other” from a Drop Down List, then he/she will be required to type in something in a TextBox control. It can be done easily in code behind, but can we accomplish the same task at the client side? The answer is yes. We can use ASP.NET validation’s client API to conditionally enable/disable validators. […]

An enhanced way to display validation errors in ASP.NET

We are all familiar with ASP.NET validators and know how to use them to give user instant response when invalid data is entered. Today, I am going to show you an enhanced way to display validation errors by using JavaScript and ASP.NET valiation client API, for instance, when a control causes a validation error, besides display an error message (or an icon), we can add a red border around the control and also change its […]