Some notes on software development... RSS 2.0
# Tuesday, 19 February 2008

Prevent ActiveSync dialog showing every time a device connects
[HKEY_CURRENT_USER\Software\Microsoft\Windows CE Services]
"Sync window display mode"=dword:00000000

No system tray icon:
[HKEY_CURRENT_USER\Software\Microsoft\Windows CE Services]

Allow guests by default:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows CE Services]

AppDeploy ActiveSync 4.x

Tuesday, 19 February 2008 14:03:42 (GMT Standard Time, UTC+00:00)  #    -

To close a process correctly you should send a close message to the application rather than just killing it, this way the application can close down gracefully.
With Compact Framework you can use the excellent OpenNETCF Smart Device Framework to send a CLOSE windows message to a window handle.
To get the correct window handle you need to use the Win32Window class from the OpenNETCF.Win32 namespace. You need to know 2 pieces of info for this - the process class id and the window name.

Finding the process Class Id and Window Name

To find the process class Id you can use handy Remote Spy application which is part of the Visual Studio 200x installation.
Start the application you want to shutdown on the CE device and connect to the device with Remote Spy.
When Remote Spy has connected it will load up a list of running processes. Find the process for your running application. Here the application I want to shutdown is called S3 Client. Double clicking the list item will bring up the Window Property dialog.
From this dialog I can get the Class Id (#NETCF_AGL_BASE_) and the Window Name (S3 Client). The Window Name is actually the form caption so you might already know that info ;)

Sending the CLOSE message to the Window

Pass in the Class Id and Window Name to the Win32Window.FindWindow method. This will return a reference to the Win32Window object. We can now use this object to get the handle to pass in to the Win32Window.SendMesage method as shown below:

Win32Window theWindow = Win32Window.FindWindow("#NETCF_AGL_BASE_", "S3 Client");

if (theWindow != null)
    Win32Window.SendMessage(theWindow.Handle, (int)WM.CLOSE, 0, 0);

Tuesday, 19 February 2008 09:27:44 (GMT Standard Time, UTC+00:00)  #    -
# Monday, 18 February 2008

Cropper is a great .NET screen capture utility, created by Brian Scott, that allows you to capture any part of the screen via a re-sizable window. Output can be redirected to BMP, JPG, PNG, Printer and Clipboard.
Output is created by simply moving and resizing the Cropper window to the area you want to capture and then double-clicking or pressing Enter with the Cropper window selected.

An example of Cropper in use from Brian's Blog:

Cropper can be downloaded here.

Monday, 18 February 2008 17:57:20 (GMT Standard Time, UTC+00:00)  #    -

Another great tool for extracting all files contained within an MSI package is Universal Extractor.
it has a huge supported file list and can extract files of type: exe, msi, zip, rar, cab, tar ... etc

It can be run from stand alone or via a Windows context menu from explorer.

Download it here.

Monday, 18 February 2008 17:45:04 (GMT Standard Time, UTC+00:00)  #    -
Deployment | Tools

Sign In
Total Posts: 116
This Year: 0
This Month: 0
This Week: 0
Comments: 36
About the author/Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2019
Hadrian Phillips

All Content © 2019, Hadrian Phillips
DasBlog theme 'Business' created by Christoph De Baene (delarou)