Translate This Page
Translate this page
Networking && Web Services
Tips and Tricks
Windows Communication Foundation
Browse by Tags
Tagged Content List
Determining the type of a device at runtime II: A single binary solution
Recently, I wrote about a mechanism to identify the type of device on which your application is running. My original solution utilized a custom unmanaged function to provide a simplified, type safe way to call the SystemParametersInfo function. Some of the folks here commented that, while my method worked...
30 Mar 2006
Determining the type of a device at runtime
There are times when it is useful for an application to know on what type of device it is running. An application may wish to modify it's user interface depending on device type (suppress button controls on SmartPhone devices, for example), or may be part of a test harness and have a need to log the...
28 Feb 2006
Checking for Screen Rotation Support using version 2 of the .NET Compact Framework - Visual Basic .Net version
Last year, I posted a snippet on how to determine whether or not your device supported screen rotation using the .NET Compact Framework . I have recently been asked for a Visual Basic .NET version of the snippet. Other than some minor reordering / reformatting, the code below is a direct port of the...
21 Feb 2006
Wrapping Unmanaged Resources
I recently wrote about three common causes of memory leaks in managed applications . In that post , I mentioned that failing to release unmanaged resources was one cause. Today, I'd like to talk a bit about one approach to working with unmanaged resources that has worked well in my code. Wrapping Unmanaged...
10 Jan 2006
Checking for Screen Rotation Support in NetCF version 2
A couple of months ago, I showed an example of how to P/Invoke to check if your device supports device rotation using version 1 of the .NET Compact Framework. In that post , I promised to revisit the example for NetCF v2 once Beta 2 was released. You may recall that in the previous version of this...
17 Jun 2005
Is my device running on battery or AC power?
At times, it's helpful to know if the device running your application is plugged in or on battery power (long duration process, software update, etc). Since the .NET Compact Framework does not provide a managed implementation for this check, you will need to P/Invoke to the native power status API. The...
10 Feb 2005
How To Get The Display's Color Depth using NetCF Version 1
I've seen this asked about recently on the NetCF ( microsoft.public.dotnet.framework.compactframework ) newsgroup, and it fits nicely with yesterday's display related p/invoke, too... :) You may have noticed that, in version 1 of the .NET Compact Framework, the Screen object (System.Windows.Forms.Screen...
2 Feb 2005
Checking for Screen Rotation Support Using NetCF
Yesterday, the Windows Mobile team posted a handy tip titled " How to check if screen can be rotated ". This got me interested in checking for screen rotation support from managed code. In V1, the structure to be marshalled is not pretty. Since the fixed size character arrays are not at the end of the...
1 Feb 2005
Page 1 of 1 (8 items)
© 2014 Microsoft Corporation.
Privacy & Cookies