Paul Olsen's experiences developing for the Compact Framework
| | Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|
| 27 | 28 | 29 | 30 | 1 | 2 | 3 | | 4 | 5 | 6 | 7 | 8 | 9 | 10 | | 11 | 12 | 13 | 14 | 15 | 16 | 17 | | 18 | 19 | 20 | 21 | 22 | 23 | 24 | | 25 | 26 | 27 | 28 | 29 | 30 | 31 | | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
Search
Navigation
Categories
Blogroll
|

Friday, April 11, 2008
Visual Studio 2008 Compatibility
There have been a few enquiries about the compatibility of the controls and Visual Studio 2008 (especially the
ColorTab Control).
With the developer demo and the purchased controls there is a Visual Studio 2005 and a Visual Studio 2008 install.
The controls in the Visual Studio 2005 install are to be used in Visual Studio 2005 targeting the .NET Compact Framework 2.0
The controls in the Visual Studio 2008 install are to be used in Visual Studio 2008 targeting the .NET Compact Framework 3.5
So, when upgrading your project to Visual Studio 2008, you must right click on the project in the solution using the Pocket PC Controls.com control and upgrade it to target .NET Compact Framework 3.5, then remove the reference to the old Pocket PC Controls.com control (targeting .NET 2.0) and add the control targeting Visual Studio 2008 and targeting .NET Compact Framework 3.5. The projects are not automatically updated to target .NET CF 3.5 when upgrading the solution to Visual Studio 2008
Friday, April 11, 2008 3:53:02 AM UTC
Technical

Wednesday, March 19, 2008
Controls Updated to Support Visual Studio 2008 (.NET 3.5)
We have updated the demo control & deliverables available to include installs for Visual Studio 2008 & .NET 3.5.
All has been tested and is running well.
The process involved:
- Update the solutions using the Visual Studio conversion wizard from Visual Studio 2005 to Visual Studio 2008
- Upgrade each of the projects from .NET 2.0 to target the .NET 3.5 platform using the right click menu on the projects themselves.
Wednesday, March 19, 2008 12:47:28 AM UTC
Technical

Friday, July 27, 2007
Helpful tools
FREE 'HANDY AS HELL' TOOLS...
This is not so much technical... more helpful.
I just wanted to share a couple of tools that I find very handy for day to day use:
1: Sync Toy - Microsoft have a free tool for, well I use it for backing up in Echo mode to an external drive. I am not too fussed with the backup system for Vista... I keep all my gear in one directory and this is all I want backed up. As you are not able to backup one directory, Sync Toy is the answer for me, you can find it here:
http://www.microsoft.com/downloads/details.aspx?FamilyId=E0FC1154-C975-4814-9649-CCE41AF06EB7&displaylang=en2: Microsoft GIF Creator - For ages, I was looking for FREE animated GIF creator and couldn't find one that I liked, the other week, I came across the Microsoft contribution and although it has been around for ages.. it is really good! If you need to create animated GIF's, you can find it here:
http://www.versiontracker.com/dyn/moreinfo/win/13212.. just MAGIC!!!
Friday, July 27, 2007 4:55:36 AM UTC
Technical

Wednesday, June 20, 2007
ILMerge GUI Source Code & Application
Well, I have tried to find an ILMerge GUI out there that will run on my machine and have had no luck, so I finally took it upon my self to create my own (although basic) GUI for the ILMerge utility for combining IL libraries.
Download Links:
ILMerge GUI ExecutableILMerge GUI Source Code (VS 2005)You will need the ILMerge application also, you can download it
hereThere is also the version history of the software
hereI use this for wrapping up the different controls into one demo executable file which saves me having to collect source code from different places and compile manually.

As I add to the app, I will update the site.
If you would like to add to the app, add comment with your changes and I will update the source & app.
Wednesday, June 20, 2007 6:06:18 AM UTC
Technical

Friday, June 01, 2007
Custom Control Design Time Attributes
I was just asked a question by a recent ColorButton Source code customer about how the design time .dll (ColorButton.PocketPC.asmmeta.dll) is created for the ColorButton Control and seeing how it is not obvious in code (there is not a seperate project), I thought I had better explain what is going on.
Within the ColorButton source, there is a file called '
DTAColorButton.xmta'. The DTA part is an abbreviation for Design Time Attributes, by no means a naming convention standard, but something that I have become comfortable with.
The .xmta file simply contains an .xml format definition of the public properties within the ColorButton class. The compiler (magic really) recognises the existance of the .xmta file and creates the ColorButton.PocketPC.asmmeta.dll file, or one appropriate for the project target.
Further, the ColorButton solution shares the one set of source code across all projects in the solution:
ColorButton.Desktop
ColorButton.PocketPC
ColorButton.Smartphone
ColorButton.WindowsCE
Apart from the Desktop compile which has alot of #'s in the code which takes care of the desktop design time attributes:
#if Desktop
[Description("Gets or sets the position information for button content"), Category("Appearance")]
#endif
The rest of the projects compile an asmmeta.dll to suit the device:
ColorButton.PocketPC.asmmeta.dll
ColorButton.WindowsCE.asmmeta.dll
ColorButton.Smartphone.asmmeta.dll
I hope this explains a bit about the source provided by Pocket PC Controls.com and may even give you some insight into creating your own controls.
If you need more info, feel free to add comment.
Friday, June 01, 2007 10:01:07 AM UTC
Color Button | Technical

Tuesday, May 22, 2007
Using Assembly Resources
In the Pocket PC Controls.com Color Picker control their is an embedded bitmap called 'palette.bmp' used for the drop down color selector. Due to the source code being available to clients, it was not acceptable to hard wire the name of the resource which would include the namespace as the source code may be inserted into projects with namespaces other than PPCC.

palette.bmp
The palette.bmp was added to the project inside a project folder called 'resources' and the build action for that file set as 'Embedded Resource'. When compiled, this resource is embedded into the assembly saving the need for adiditional external files.
Rather than using the fully qualified name for the image ie: 'PPCC.resources.palette.bmp', I have simply searched through all available resources to find the 'palette' bitmap.
System.Reflection.Assembly asm = System.Reflection.Assembly.GetExecutingAssembly();
string[] s = asm.GetManifestResourceNames(); // extract names of all embedded resources
for (int i = 0; i <= s.GetUpperBound(0); i++) // wind through all available resources
if (s[i].IndexOf("palette") > 0) // if we find the one we want
_ColorBitmap = new Bitmap(asm.GetManifestResourceStream(s[i])); // assign that resource for use into a local variable
If you are happy to hard wire the resource name, you could always use ILDASM.exe after compilation to find the fully qualified name of the embedded resource, simply double click on the MANIFEST entry. ILDASM.exe is installed with Visual Studio (C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin) and is an excellent tool to have a look at what is going on inside your compiled IL assemblies, it has been a great tool for me over the years.
Tuesday, May 22, 2007 9:33:40 AM UTC
Technical

Sunday, May 20, 2007
ColorButton Control v1.7
It was brought to my attention that the ColorButton control had no way of determining that it had focus!!!
We stuck with the standard button behavior of thickening the border of the button when focused.
The DrawColorButton method looks like this now:
private void DrawColorButton()
{
CollectColors();
// draw the button to the screen
switch (_ButtonShape)
{
case ButtonShape.Ellipse :
if (_ShowGradient)
Draw.Gradient(_Graphics, this.Bounds, _BackDownColor, BackColor, (int)_GradientDirection, (int)_ButtonShape);
else
_Graphics.FillEllipse(_Brush, 0, 0, Width-1, Height-1);
_Graphics.DrawEllipse(_Pen, 0, 0, Width-1, Height-1);
if (base.Focused)
_Graphics.DrawEllipse(_Pen, 1, 1, Width - 3, Height - 3);
break;
case ButtonShape.Rectangle :
if (_ShowGradient)
Draw.Gradient(_Graphics, this.Bounds, _BackDownColor, BackColor, (int)_GradientDirection, (int)_ButtonShape);
else
_Graphics.FillRectangle(_Brush, 0, 0, Width, Height);
_Graphics.DrawRectangle(_Pen, 0, 0, Width-1, Height-1);
if(base.Focused)
_Graphics.DrawRectangle(_Pen, 1, 1, Width - 3, Height - 3);
break;
}
DrawStringToButton();
DrawIconToButton();
}
Those of you who purchased the control in the last 6 months would like the update please send me an email.
There is still no way of determining if the ColorButton has focus when using images and we will add this functionality in the near future. If there are any of you who would like to see a new image property added to cater for the focused state, please let me know and we can push that along.
You can see here that colorButton2 has focus:
Sunday, May 20, 2007 6:32:03 AM UTC
Technical | Color Button