Wednesday, January 30, 2008

I love this little bit of code.

if (Debugger.IsAttached)
{

}

If you want your application to do different 'stuff' when you are debugging it, then the above works a treat.

I'm using it now to start a windows service as a console application when I run it in debug mode. (wicked)

Wednesday, January 30, 2008 3:23:12 PM UTC  #    Comments [0]  | 
Monday, January 28, 2008

Not that all of our development work in under Visual Studio 2008,  I thought it would be wise to begin making proper use of Team Foundation Server (TFS).   Free trial here -

http://www.microsoft.com/downloads/details.aspx?FamilyID=B0155166-B0A3-436E-AC95-37D7E39A440C&displaylang=en

TFS, offers first class source control and project management of any software focused project.

The install went very smoothly, installing the Workgroup version of Team Foundation Server 2008 onto an already used server.  

However I found one small issue.   In the same IIS virtual directory to TFS I have other web projects,   that use integrated security to connect to databases.

Integrated security fails to work, unless you add the following to your web.config files.

Add this to your <system.web> section.

<pages>
<tagMapping>

   <remove tagType="System.Web.UI.WebControls.SqlDataSource, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

</tagMapping>

</pages>

Technorati Tags:
Monday, January 28, 2008 2:57:28 PM UTC  #    Comments [0]  | 

So as regular readers will know,   I've been using an Old Pocket PC as a caller ID server for about the past 3 years.

For those of you unfamiliar with this mission have a look at -

www.binaryrefinery.com/main/PermaLink,guid,d8f9b0a3-f884-4a81-87e5-448d2beda19c.aspx

Sadly after upgrading my wireless router my old Ipaq 3600 with an expansion jacket with 3com wireless network card  proved itself to be obsolete.    I previously was only using WEP security which the 3com Pocket PC drivers supported nicely.    However now I'm using sparkly  WPA-Personal TKIP encryption, suddenly the Ipaq has no way of seeing my home network.

image

Anyway,  all was not lost.     I've ported the caller ID application to be a Windows Service and it runs fine on the my Small Business Server.    I guess moral of the story,   I could have spent out and got a more up-to-date network card, but the lowest cost option for me was to port the code.  

I achieved the port of the C# application from .Net Compact framework to full framework Windows Service and an ASP.Net application in around an hour.      I guess its this kind of portability that we take for granted makes this type of conversion so easy.

Anyway,   final upshot.   As anyone calls my house.   I get email alerts for who's calling  popup messages on all PC's on home network and the ability to update the names to numbers mapping securely over the Internet.   What a cool geek project.

 

image

Monday, January 28, 2008 8:23:16 AM UTC  #    Comments [2]  | 
Wednesday, January 23, 2008

So for the past few days I've had my first real look at a Symbol MC35.    Its a great little device, small form factor low price.

However, I have one concern in an effort to-do everything it uses the camera to-do barcode scanning.

image

This is great,  a real innovation why can't all Windows Mobile devices do just this with their cameras?

 

However my only complaint is that the Symbol's barcode reader only works in Wedge mode. Wedge mode means drop the barcode wherever the cursor is.    This although works is a little bit 1980's.

More expensive Symbols use the Symbol SDK which fires a nice event when the barcode scanner scans.   Events are great, you can parse, validate and 'do stuff' on successful barcode scan.   This is all lovely,  and works really well.   Wedge mode really doesn't come anywhere close to this.

So why am I complaining?   Its all good small package right price etc.    But why oh why did the SDK integration have to be lost?   Surely it couldn't have added much more to the R&D cost?

 

Rant Over...

Wednesday, January 23, 2008 10:59:02 PM UTC  #    Comments [0]  | 
Thursday, January 17, 2008

I often have customers peering over my shoulder while developing.   I always count to ten in my head, before I hear the invertible request of 'can you increase your font size'.

So today  I wrote a quick macro in Visual Studio 2008, to-do just that  adding a couple of buttons onto the toolbar to give me a nice easy way of adjusting -

image

Here's the couple of little VBA macro's

Public Sub IncreaseFont()
      DTE.Properties("FontsAndColors", "TextEditor").Item("FontSize").Value += 1
  End Sub

  Public Sub DecreaseFont()
      DTE.Properties("FontsAndColors", "TextEditor").Item("FontSize").Value -= 1
  End Sub

Thursday, January 17, 2008 8:32:25 PM UTC  #    Comments [0]  | 
Thursday, January 10, 2008

Just remember if you do as I have just done and upgrade from Visual Studio 2005 to 2008,  any projects that use SQL Compact will be automatically upgraded to reference SQL Compact 3.5

Of course this means that if your rolling out applications you have to install the SQL Compact 3.5 client cabs to your devices.

I followed this article to find the location of the new cab files -

http://msdn2.microsoft.com/en-us/library/13kw2t64.aspx

Interesting however,  it seems that I can sync just fine to .Net Compact Framework server tools 3.1.

For a full description of what works with what,  look at -

http://blogs.msdn.com/sqlservercompact/archive/2007/12/19/connectivity-cross-version-compatibility-sql-server-compact-3-5.aspx

 

Thursday, January 10, 2008 2:02:01 PM UTC  #    Comments [0]  | 

I often find myself at a customer site,  when I quickly need to mock up some .Net Compact Framework forms.   I'm sure you all know this, but I didn't realise until I looked that it is possible to save any Visual Studio (across all versions) item as a template.   By item, I mean  form, class, user control etc.

Here's the process.    I wanted to save a standard form out as a template.       First create your dream form, as follows -

image

From the File menu,   select Export Template...    

image

Select Item Template,   and pick the project which contains your form.   Then select Next.

 

image

Select the form you require to be saved as a template, then click Next.

The next screen prompts if you wish to reference any assemblies.   In this case, I don't so just click Next.

Almost there.   Next screen you give your template a name -

image

Click Finish, and you are good to go.

Now in Visual Studio,  when you select Add New Item To Project you will see your form,   as follows -

 

image

 

And that's it.   No more boring re-creation of commonly used items.

Thursday, January 10, 2008 9:03:04 AM UTC  #    Comments [0]  | 
Wednesday, January 09, 2008

I've just noticed this within the Windows Mobile 6 SDK Refresh.

Previously if you're using the device emulator and wanted to use the device emulator to test the camera functionality you just couldn't.

image

It seems to be that this has now been fixed, so  this works great.

CameraCaptureDialog cam = new CameraCaptureDialog();
cam.Mode = CameraCaptureMode.Still;
cam.StillQuality = CameraCaptureStillQuality.Low;
cam.Title = "A Pic";
DialogResult dr = cam.ShowDialog();

You can a test image when using the emulator.

Another nail in the coffin for me getting a sexy device with built in camera :-)

Wednesday, January 09, 2008 3:25:21 PM UTC  #    Comments [0]  | 
Monday, January 07, 2008

So new year new development environment and we're off to a flying start with Visual 2008.

We decided today to take the plunge and convert a .Net Compact Framework 2.0 application over from Visual Studio 2005, to 2008.

We're moving lock stock over to the new environment.      So here's our experience,  ITS GREAT.

Drag and drop the solution file .sln on Visual Studio 2008 and it does all the conversion for you and 5 minutes (it was a big project) and off we go.

image

Ran without problems,    deployed to the device and off we go.    I recommend it...

Monday, January 07, 2008 8:50:48 PM UTC  #    Comments [0]  | 
Sunday, January 06, 2008

We all need to organise our Lego at some point.   Here's how.

http://www.evilmadscientist.com/article.php/efficientlego

(gosh, these guys have time on there hands)

Sunday, January 06, 2008 11:20:28 PM UTC  #    Comments [0]  | 

Just found this article.   Talking you through providing email support from Small Business Server/Exchange to allow iPhone to sync email.

http://www.nogeekleftbehind.com/2007/09/14/using-an-iphone-with-sbs-2003/

I've got this working on iPod touch too, by installing iPhone apps, on an JailBroken Touch,

Sunday, January 06, 2008 10:43:51 PM UTC  #    Comments [1]  | 

Theme design by Jelle Druyts

Pick a theme: