Fixing Visual Studio’s System.OutOfMemoryException

Over the last little while Visual Studio 2005 has been crashing seemingly “randomly”. Sometimes it would happen when just trying to open a source file, other times when trying to debug a web app. A few co-workers asked if I wanted to try ReSharper, so I installed that. After installation crashing seemed much more frequent, so I went into Add-in Manager and disabled ReSharper.

My machine at work has 4GB of memory, and is running Windows XP. So I had assumed I had more than enough memory available for VS 2005 to use.

I had almost given up on fixing the issue, but yesterday came across the following blog post by Steven Harman titled Hacking Visual Studio to Use More Than 2Gigabytes of Memory.

Basically the solution was to boost the user-mode memory from 2GB to 3GB in XP via adding the /3GB to your BOOT.ini file, then making Visual Studio “Large Address” aware using the editbin command.

Internet Explorer 8 Beta 1 – Changes for Devs

The IE Team have just announced the availability of Beta 1 of IE8 for developers. You can read more about that on their blog.

Obviously as a web developer, the mind immediately turns to “so, what’s in it for me?”.

Picked up the following points from an MSDN Doc on what’s new for IE8:

Oh, and IE8 Whitepapers.

And finally, for those who want to try IE8 with no risks, you can download a Virtual PC image with IE8 from here.

Random Links

Okay, I just need to unload a whole bunch of links that have been open in various tabs in IE7.

Improve your wireless network in ten different ways via
Managing The Madness: What you need to know about covering the NCAA Tournament via Strobist.
Ace your next phone interview via
How to find free eBooks for your cellphone or PDA via
Tech support with VNC reverse connections via
Speed up your hard drive defrag via
Data Encryption Toolkit for Mobile PCs via

And one more link, for those using IE7. It’s an add-in called IE7Pro, which has a few interesting features such as crash recovery and tab history.

Windows Mobile 6 SDK is not out!

Looks like you can now download the new SDK for Windows Mobile 6 Standard (Smartphone) as well as for Windows Mobile 6 Professional (PPC Mobile). I reckon the new names are far too long. Looks like they were prematurely uploaded.

But from what I’ve read, the next version of Windows Mobile will combine the features of both the Smartphone and the PPC, rather than having two seperate versions. So perhaps the current naming is just a step in the path of what’s to come?

Haven’t had a look at them yet, but for a rundown of what’s new, check out the MSDN article.

The great news from my perspective as a mobile application developer is that .NET CF 2.0 as well as SQL Server Mobile 2005 will come preloaded in the device ROM. Which means less things to install for end users.

From the MSDN article, we also learn that there’s also a new Fake GPS utility for the Emulator so you can test out the GPS features in your apps. In addition to a brand new cellular emulator to enable testing of the incoming call, incoming SMS, dropped calls and dropped data connectivity scenarios. That’s more good news for developers!

I wonder if that’s really just an extension to the “bounce back” feature we had previously? Eg: Call +14250010001 in your emulator, and you’ll get a call connected. And if you send an SMS to that same number, you’ll get a new SMS in your Inbox from that number.

And another interesting feature from that article is a Inking API (a lightweight version of what’s available for the Tablet PC).

From all the new Windows Mobile based devices I’ve seen over on Engadget Mobile (as well as several other websites/blogs) over the past year I think this year and beyond are only going to get bigger for the Windows Mobile based industry. There seems to be several new devices from manufacturers including HTC, Toshiba, LG, Gigabyte, ASUS and probably a few others I haven’t mentioned.

Looking at all the new mobile devices makes my i-mate SP5 start to look a little dated now…

Customising your Windows Mobile Smartphone and Pocket PC

Windows Mobile 5.0 Pocket PC Edition today screen customisations:

Guide to creating Windows Mobile 5.0 Pocket PC themes via

Windows Mobile 5.0 Smartphone Edition homescreen customisations:

Homescreen Guide for Beginners via MoDaCo.
Customizing the Microsoft Smartphone 2002 homescreen via MSDN.

Although the second link refers to the Smartphone 2002 version, many things seem to be quite similar.

I think what’s interesting is that you can create custom Smartphone homescreens using just a single background image, and an XML file. That makes things pretty easy to create.

There are apps out there that can help you create themes for either the Smartphone or the Pocket PC.

But I think for the time being, if you only want to dip your toes in the water without wanting to fork out any money, the guides from Xda-Developers and MoDaCo should get you started.

If you’d rather just download themes rather than making your own, then here’s a few sites you can download free ones:


Pocket PC:

Google Maps and Visitor Stats

I got an email the other day from my the company (StatCounter) that provides the hits stats to this blog that they’re now using Google maps to show us where our visitors are from!

Statcounter's Google Map of Visitors

Pretty cool, you just click on one of those red “pins” and it’ll give you expanded information on that particular visitor (data which they already provide you in another view).

I’m sure you could do the same with other map providers like Windows Live Local or Yahoo Maps.

Mobile Client Software Factory (aka Mobile Baseline Architecture Toolkit)

Just noticed that there’s a Compact Framework version of the Smart Client Baseline Architecture Toolkit called the Mobile Client Software Factory available now.

Francis K. Cheung has a series of posts on his blog about issues relating to porting to the Compact Framework.

On a side note, is anyone else heading to MEDC 2006 in Melbourne?

Edit: Looks like Nick Randolph has a series of posts on the Mobile Client Software Factory.

Thoughts on Internet Explorer 7

I’m one of many web developers out there that run Windows and have downloaded and installed the Internet Explorer 7 Beta 2 build (as well as the other CTP builds).

Honestly, I don’t use a lot of the new features that have been included in IE7. But there is one feature that I’m loving, and using quite a lot right now.

That feature is the Page Zoom Level feature.

Sure, all modern browsers (IE6/Firefox) have their text-size adjustment options, but only IE7 and Opera have a page zooming option. I’m finding the feature quite useful for certain websites out there that have set their text size to a fixed, non-adjustable size. Especially when reading for long periods of time.

Sure, cleartype helps, but it can only help to a certain extent.

It might be different for some people who probably have better eyesight than myself (i’m long sighted, so seeing things up close isn’t as clear as things a bit further away.).

On tabs, sure, I use them, but that’s one of many features that I could live without if it weren’t there.

RSS? I’ve subscribed to a few feeds to see how the feature works. Overall, I think I could live without that feature too. I prefer reading my feeds all in the one place. And that place at the moment (and has been for quite awhile now) is BlogLines. (Though, BlogLines seems quite sluggish in IE7 for some reason.)

There’s also the minor annoyance of some websites’ JavaScript being not up to scratch for their menus. But I can live with that.

Improved CSS? Well, from a developers’ point of view, I reckon that’s cool. But as an end user? I’d not care too much, as long as I can read what I need to. And get what I want from the website without too much trouble.

Sometimes we (the alphageeks of this planet :P) can get so caught up discussing features of a product (where it excels, where it fails etc) that we often forget that all the end user wants is to be able to read the content that they want.

Somedays I’ve watched my father (who is in his eary 60’s) use a computer i’ve setup for him to use. He surfs the web to read his Chinese news from various news outlets, as well as making use of email to communicate with some of his former classmates whom he hasn’t seen in almost 40 years. And if he can find some streaming audio news, he’ll stream it. He’s still fairly new to computers, but he’s gotten a grasp of some things quite quickly.

He’ll still ask for help from either my brother or me when he needs it. I’ve installed the Google Toolbar for him, but he’s now started typing in URLs for websites in the Google Toolbar search box, rather than the IE addressbar! But hey, it works. And it also helps him when he doesn’t know the exact URL. It’ll just bring up results that are closeto what he wants and he’ll just click away.

When I had one of the old 15″ CRT monitors setup for him, he’d often move his head closer to the screen to read text on a website. I recently replaced the 15″ with a 17″ CRT and kept the resolution the same (1024×768), which has made somewhat of an improvement. One of the issues dad has is some websites restrict the text-size to just the one size. (I know, I could always switch the screen resolution from 1024×768 to 800×600. But I didn’t want to change everything else dad was happy with.)

Overall, despite sometimes using a bit too much memory, I’m fairly happy with IE7. Actually, I’m happy with all browsers. They all have their own strongpoints, and you use which you feel most comfortable with.

I’ve used Opera, IE4 to IE7, various builds of Firefox (since I think the Phoenix v0.6 days). I used Netscape Communicator in it’s day.

I think the memory issues i’m seeing with IE7 are related to JavaScript code, as whenever I see the browser with a fair chunk of memory allocated to it, it’s usually when I’m at websites that utilise JavaScript quite heavily (such as BlogLines). Flickr seems fine for the most part, as does GMail.

Google Calendar refuses to work though. It says my browser doesn’t meet the minimum requirements. (Requirements state that as far as IE is concerned I need IE6+. 6 is higher than 7, right? 😛 — Just joking around with the last comment.)

More Windows Mobile devices

Awesome, looks like there’s going to be even more Windows Mobile based devices hitting the market.

See this post at MyPDACafe (via Jason Langridge’s blog) about new devices being manufactured by Chinese device manufacturer, Tech Faith Wireless (TFW), which looks like it will be going head to head with another Original Device Manufacturer (ODM) that is quite well known these days, HTC. HTC is the manufacturer of many of the current crop of popular Windows Mobile based devices being rebranded as i-mate, QTek, O2, Orange (as well as several others).

Can’t wait til these devices hit the market. Hopefully, more competition resulting in lower prices and a bigger market share for Windows Mobile based devices. It can only be a good thing for Windows Mobile developers, right?

Only allow full synchronisations when a WindowsMobile device is cradled

When developing a Windows Mobile based application, you’re often presented with the “I want everything synchronised between my device and my PC” scenario.

While yes, it’d be great to have everything synchronised when you’re on the go (via GPRS, etc), and having little changes filtered through to the device.

The little changes is fine, but what about doing a full synchronisation? Surely, you wouldn’t want users to do a full sync whilst out on the road with data being charged per kilobyte (at a high rate)?

I’m not too sure how the data rates (for GPRS) are overseas, but over here depending upon your telco, it does get quite pricey after you go beyond your alloted monthly data allowance.

One way of disabling a full synchronisation whilst on GPRS is to use the SystemState.Changed event to detect when the device is cradled.

Here’s an example (using Windows Mobile 5.0’s managed API and C#):

public class Form1 : Form
Microsoft.WindowsMobile.Status.SystemState systemState;
public Form1()
systemState = new Microsoft.WindowsMobile.Status.SystemState(Microsoft.WindowsMobile.Status.SystemProperty.CradlePresent);
systemState.Changed += new Microsoft.WindowsMobile.Status.ChangeEventHandler(systemState_Changed);

protected void systemState_Changed(object sender, Microsoft.WindowsMobile.Status.ChangeEventArgs args)
// Show whether the cradle is present
MessageBox.Show("Is the cradle present? " + Microsoft.WindowsMobile.Status.SystemState.CradlePresent.ToString());

The above is just some sample code that you can modify to meet your requirements.

You could use the boolean value returned by SystemState.CradlePresent to toggle your full synchronisation option.

You should also check out the State and Notification Broker sample that comes with the Windows Mobile 5.0 SDK.