Every CF developer knows and uses the “Copy if newer” option from time to time, when deploying on Compact Framework. This way the deployment is a little bit faster. Since I tried to do some C# OpenGL ES stuff on my HTC Touch Diamon as a private project, I came across a real annoying bug. Visual Studio 2008 shows an error during deployment of the:

libGLES_CM.dll (I placed it as a “Content” file inside the project)

The funny thing is the error varies from one deployment to another, top error messages are:

“An operation was attempted on something that is not a socket.”

“Connection has been closed gracefully”

“Connection forcibly closed by remote host”

No search brought a solution to this bug, till after some “testing” (I used my DPD = drinking/programming/drinking method again ;) ).
If you switch from “Copy if newer” to “Copy always” the errors are gone.

Share and Enjoy:
  • Technorati
  • Digg
  • Facebook
  • del.icio.us
  • Live
  • Google Bookmarks
  • DotNetKicks
  • DZone
  • TwitThis
  • Blogosphere News
  • Blogplay
  • LinkedIn
  • MisterWong
  • MisterWong.DE
  • MSN Reporter
  • MyShare
  • RSS
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Tumblr
  • Twitter
  • Webnews.de
  • Yahoo! Bookmarks
  • Yigg

Since I do some Compact Framework programming on the side. I ran into the problem on how to do full screen applications on WM. Due to our background as “third level developers” we got a pretty good framework for C# Compact Framework programming and there I found the good old HHTaskBar “Hack”.

public static class TaskBar
{
    private static IntPtr taskbar; 

    [DllImport("coredll.dll", EntryPoint = "FindWindowW", SetLastError = true)]
    private static extern IntPtr FindWindowCE(string lpClassName, string lpWindowName); 

    [DllImport("coredll.dll")]
    private static extern IntPtr ShowWindow(IntPtr hWnd, int visible); 

    [DllImport("coredll.dll")]
    private static extern bool EnableWindow(IntPtr hwnd, bool enabled); 

    /// <summary>
    /// hides windows taskbar
    /// </summary>
    public static void HideTaskbar()
    {
        taskbar = FindWindowCE("HHTaskBar", null);
        ShowWindow(taskbar, 0);
        EnableWindow(taskbar, false);
    } 

    /// <summary>
    /// shows windows taskbar
    /// </summary>
    public static void ShowTaskbar()
    {
        ShowWindow(taskbar, 1);
        EnableWindow(taskbar, true);
    } 

}

This is fine,… but if the app crashes or you forget to implement the  ”ShowTasbar” function your TaskBar is gone (till the next cold reset). So I searched and found the following “lightweight” way to “hide” the TaskBar.

public static void FullSize(Form frm)
{
    frm.WindowState = FormWindowState.Maximized;
    frm.Size = Screen.PrimaryScreen.WorkingArea.Size;
    frm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
}

Only tested for WM 5.0, 6.0 and 6.5!

Share and Enjoy:
  • Technorati
  • Digg
  • Facebook
  • del.icio.us
  • Live
  • Google Bookmarks
  • DotNetKicks
  • DZone
  • TwitThis
  • Blogosphere News
  • Blogplay
  • LinkedIn
  • MisterWong
  • MisterWong.DE
  • MSN Reporter
  • MyShare
  • RSS
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Tumblr
  • Twitter
  • Webnews.de
  • Yahoo! Bookmarks
  • Yigg

 

Kaum gepostet ist “Mäxchen” auch schon getestet! Saijo George hat in seinem Bestwindowsmobileapps – Blog “Mexican” einen Review über unser neuestes Machwerk geschrieben.

Und um uns Arbeit zu ersparen ;-) auch ein kleines Video gemacht.

Den gesamten Review gibt es unter Mexico 1.0 – Mexican dice game on windows phone | Best Windows Mobile Games / Windows Phone Apps Review

Share and Enjoy:
  • Technorati
  • Digg
  • Facebook
  • del.icio.us
  • Live
  • Google Bookmarks
  • DotNetKicks
  • DZone
  • TwitThis
  • Blogosphere News
  • Blogplay
  • LinkedIn
  • MisterWong
  • MisterWong.DE
  • MSN Reporter
  • MyShare
  • RSS
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Tumblr
  • Twitter
  • Webnews.de
  • Yahoo! Bookmarks
  • Yigg

In the ongoing quest to create Compact Framework applications that look nice I recently found a good post on how to draw Rounded Rectangles with CF: How to draw a rounded rectangle in .NETCF 

The author Christian Helle also has a Second post where the Rounded Rectangles get filled with a Texture

There is also ways without the GDI Functions but those are a little more complicated.

Share and Enjoy:
  • Technorati
  • Digg
  • Facebook
  • del.icio.us
  • Live
  • Google Bookmarks
  • DotNetKicks
  • DZone
  • TwitThis
  • Blogosphere News
  • Blogplay
  • LinkedIn
  • MisterWong
  • MisterWong.DE
  • MSN Reporter
  • MyShare
  • RSS
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Tumblr
  • Twitter
  • Webnews.de
  • Yahoo! Bookmarks
  • Yigg

Just learned something new – on one CE 6 Platform I recently had Issues with my GradientFill based  controls. – Google didn’t show me any useful hints!

Today when browsing Platform Builder I found the reason:

clip_image002

Gradient Fill Support is an extra Option that needs to be ticked.

Share and Enjoy:
  • Technorati
  • Digg
  • Facebook
  • del.icio.us
  • Live
  • Google Bookmarks
  • DotNetKicks
  • DZone
  • TwitThis
  • Blogosphere News
  • Blogplay
  • LinkedIn
  • MisterWong
  • MisterWong.DE
  • MSN Reporter
  • MyShare
  • RSS
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Tumblr
  • Twitter
  • Webnews.de
  • Yahoo! Bookmarks
  • Yigg

*AT THIS TIME IT HAS BEEN TAKEN OFFLINE – seems to cause problems!*

Finally there is Windows Mobile 6.5 SDK ready for download!  You can get it from here: Windows Mobile 6.5 SDK
There are Downloads for the following languages:

  • 0804 CHS Chinese Simplified
  • 0409 USA English
  • 0407 GER German
  • 040c FRA French
  • 0410 ITA Italian
  • 0c0a ESN Spanish
  • 0411 JPN JapaneseMore detailed further reading can be found here on Nick’s blog
  • Share and Enjoy:
    • Technorati
    • Digg
    • Facebook
    • del.icio.us
    • Live
    • Google Bookmarks
    • DotNetKicks
    • DZone
    • TwitThis
    • Blogosphere News
    • Blogplay
    • LinkedIn
    • MisterWong
    • MisterWong.DE
    • MSN Reporter
    • MyShare
    • RSS
    • StumbleUpon
    • Suggest to Techmeme via Twitter
    • Tumblr
    • Twitter
    • Webnews.de
    • Yahoo! Bookmarks
    • Yigg

    Eine gute bzw. die einzige vernünftige Möglichkeit MissingMethodExceptions und TypeLoadExceptions einer .NET Compact Framework Anwendung zu identifzieren ist das Loader Log. Dieses kann mittels der Registry aktiviert werden: Dazu sind folgende Schritte nötig:

    1. CLR Logging aktivieren. Folgenden Wert auf 1 setzen:
    HKLM\Software\Microsoft\.NETCompactFramework\Diagnostics\Logging\Enabled

    2.Loader Log aktivieren. Folgenden Wert auf 1 setzen:
    HKLM\Software\Microsoft\.NETCompactFramework\Diagnostics\Logging\Loader\Enabled

    Im Prinzip reicht da schon aus. Das Logfile wird im Verzeichnis der Anwendung erstellt und heißt netcf_loader.log.
    Empfehlenswert sind noch folgende zusätzlichen Einstellungen:

    3.Anwendungsnamen im Logfile Namen (z.B.: netcf_myApp_loader.log. Nützlich wenn mehrere Anwendungen im gleichen Verzeichnis sind. Folgenden Wert auf 1 setzen:
    HKLM\Software\Microsoft\.NETCompactFramework\Diagnostics\Logging\UseApp

    4.Prozess Id im Logfile Namen. Folgenden Wert auf 1 setzen:
    HKLM\Software\Microsoft\.NETCompactFramework\Diagnostics\Logging\UsePid

    5. Log immer sofort schreiben. Nützlich wenn die Anwendung abstürtzt. Achtung, wirkt sich negativ auf die Performance aus. Folgenden Wert auf 1 setzen:
    HKLM\Software\Microsoft\.NETCompactFramework\Diagnostics\Logging\Flush

    Falls die genannten Registry Einträge noch nicht exisitieren, kann man diese einfach erstellen. Alle Werte sind vom Typ DWORD.

    Mehr Informationen gibts im Blog von  Steven Pratschner und Dawid Kline.

    More Information and an englisch description are posted on the blogs of Steven Pratschner and Dawid Kline.

    Share and Enjoy:
    • Technorati
    • Digg
    • Facebook
    • del.icio.us
    • Live
    • Google Bookmarks
    • DotNetKicks
    • DZone
    • TwitThis
    • Blogosphere News
    • Blogplay
    • LinkedIn
    • MisterWong
    • MisterWong.DE
    • MSN Reporter
    • MyShare
    • RSS
    • StumbleUpon
    • Suggest to Techmeme via Twitter
    • Tumblr
    • Twitter
    • Webnews.de
    • Yahoo! Bookmarks
    • Yigg