南山狒狒

专注WinCE和GIS开发,提升ArcGIS和DirectShow,涉及过BizTalk,有Delphi经历
09年后的路,应该好好走了。

  博客园 :: 首页 :: 联系 :: 订阅 订阅 :: 管理
  43 Posts :: 38 Stories :: 19 Comments :: 0 Trackbacks

2009年6月15日 #

什么都不说了,留个地址,感兴趣的自己去看。

网址:http://www.koushikdutta.com/2008/10/drawing-text-in-opengl-es.html

下载地址:http://hosted.koushikdutta.com/ManagedOpenGLES.zip

posted @ 2009-06-15 01:38 Jrong 阅读(6) | 评论 (0)编辑

2009年6月9日 #

无意中发现了这个东东,可以开拓视野,留下备查。

 

iPhoneBrowser 是一個在PC端運行的軟體,你可以用它來管理 iPhone 上面的檔案。

軟體名稱:iPhone Browser 1.8.1
官方網站:http://code.google.com/p/iphonebrowser/
軟體授權:New BSD License
支援語言:English
作業系統:Microsoft Windows

 

SVN:http://iphonebrowser.googlecode.com/svn/trunk/

posted @ 2009-06-09 21:12 Jrong 阅读(25) | 评论 (0)编辑

2009年5月9日 #

放上,备查。打印用

 

┏╗        ┏┓╔┓  

║┃╔━╦╦┳═╗ ║╚┛┣═╦┳

┃╚┫║┃┃┃╩┫ ┗╗┏╣┃┃║

╚━╩═┻━╩━╝ ┗╝┗═┻═╝

posted @ 2009-05-09 11:45 Jrong 阅读(10) | 评论 (0)编辑

2009年2月16日 #

原文:http://www.cnblogs.com/appleseeker/archive/2009/02/02/1382583.html

这篇文章中将介绍如何隐藏起Form右上角的OK/X按钮,有时候用户觉得不需要这个按钮,那去掉它吧~~~~

再次介绍下该按钮的功能,X表示最小化,OK表示确认并关闭.通常新建一个Form后,默认窗体的最小化是True,所以如果需要显示OK的话,就需要将该属性设为False.

隐藏该按钮需要调用3个API

Code

 

具体使用

Code


在实际调用时,只要将窗体的Handle作为参数传入即可.

隐藏按钮后,如何打开?
只需要设置窗体的MinimizeBox属性即可.想显示OK,设为False.想显示X,设为True即可.

 

代码下载:DeviceTechDemo.rar

运行环境:VS2008 + WM6.0 + .net cf3.5

posted @ 2009-02-16 11:17 Jrong 阅读(82) | 评论 (0)编辑

原文:http://www.cnblogs.com/enjoyitzwg/archive/2008/10/23/1318304.html

 

最近用VS2008开发Windows Mobile程序,使用C#、.NET Compact Framework,发现项目生成速度比较慢。用VS2008打开项目后,开始一段时间生成速度还能忍受,时间一长,编译速度巨慢,最慢达到5分钟之久,实在无法忍受。

 

决定找出VS2008生成时,做了什么花费时间的工作。从工具à选项进入“选项”对话框

选择“
MSBuild项目生成输出详细信息”为“诊断”这样编译时,会输出具体执行了那些任务,花费了多少时间。

 

结果发现最花费时间的是 Platform Verification Task

http://blogs.msdn.com/vsdteam/archive/2006/09/15/756400.aspx Platform Verification Task 的具体描述

 

参照上文的说明,修改文件 C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.CompactFramework.Common.targets 中
<Target
        Name="PlatformVerificationTask" Condition="'$(SkipPlatformVerification)' == 'true'" >
        <PlatformVerificationTask
            PlatformFamilyName="$(PlatformFamilyName)"
            PlatformID="$(PlatformID)"
            SourceAssembly="@(IntermediateAssembly)"
            ReferencePath="@(ReferencePath)"
            TreatWarningsAsErrors="$(TreatWarningsAsErrors)"
            PlatformVersion="$(TargetFrameworkVersion)"/>
    </Target>
部分,红色文字为新增加的部分

于是项目生成速度大幅提高。

posted @ 2009-02-16 11:10 Jrong 阅读(164) | 评论 (0)编辑

2009年2月12日 #

    IIS出了点问题,就重新安装。于是在安装IIS时如果老提示无法复制convlog.exe、iisadmin.mfl等文件。在网上搜一堆,说是因为损坏了系统内部数据库所致.修复损坏的数据文件即可正常安装。
解决方法如下(开始 > 运行 > 输入 CMD >再输入以下命令):
1、esentutl /g %windir%/security/database/secedit.sdb (该命令参数用于查询secedit.sdb文件是否被损坏)
2、esentutl /p %windir%/security/database/secedit.sdb (修复secedit.sdb文件)

这样convlog.exe是可以安装了,但到了iisadmin.mfl无法找到。点浏览 > C:\WINDOWS\ServicePackFiles\i386 ,导航到这个文件夹下,再点确定,就可以安装了!
posted @ 2009-02-12 10:24 Jrong 阅读(757) | 评论 (0)编辑

2009年2月4日 #

     摘要: -原文:http://blog.csdn.net/xiaolei1982/archive/2008/04/15/2294364.aspx看了下文章,很具参考性,我干脆就拷贝下来了。在网上查找了不少的资料,可以说大同小异,概念性的东西网上一搜一堆,今天把反射的东西整理了一下,供大家使用,我保证我这里是最全面的东西,当然也是基础的东西,在学好了这一切的基础上,大家可以学习反射的具体插件等应用,老鸟就不... 阅读全文
posted @ 2009-02-04 15:42 Jrong 阅读(30) | 评论 (0)编辑

     摘要: 我们要想实现中文发音或中文语音识别,必需先安装微软的Speech Application SDK(SASDK),它的最新版本是 SAPI 5.1 他能够识别中、日、英三种语言,你可以在这里下载:http://www.microsoft.com/speech/download/sdk51/,需要安装这两个文件Speech SDK 5.1和5.1 Language Pack,其中5.1 Languag... 阅读全文
posted @ 2009-02-04 08:59 Jrong 阅读(133) | 评论 (0)编辑

2009年2月3日 #

刚才看到一个极其精彩的代码,我实在忍不住就发博客上了,原文地址:http://www.christec.co.nz/blog/archives/279

 

Screenshot showing sample today screen item written in C#Today I thought I would demonstrate a proof of concept that may enable you to create today screen items in managed languages such as C# or VB.NET. In part this early preview was brought about by a recent request for advice on how to create managed Input Methods for the SIP keyboard, something that I think could be achieved using a similar approach. This is still a work in progress to see what is possible…. at the moment I have not fully evaluated the technique to be valid and/or tidied the code to my usual standard for release. I would love your feedback on this project.

Problem Definition

The Windows Mobile OS has a Today Screen API that enables custom items to be displayed on the main screen of the device. This API is highly geared towards native (C or C++) developers, and it is not possible for managed (VB.NET or C#) developers to implement the API directly.

Jim Wilson previously demonstrated in an MSDN article titled “Creating a Pocket PC Today Screen Plug-in with the .NET Compact Framework” a technique were a C++ based today screen item was developed to display HTML based content that was generated by a C# application. Although this is suitable for some applications it doesn’t lend itself to highly interactive or graphic intensive animated displays.

What we ideally want to do is to implement a minimal amount of native code that satisifies the requirements of the Today Screen API and have this native stub delegate all the GUI functionality off to a managed application.

It would also be extremely handy if the native part of this solution could be written once and reutilised among multiple managed today screen items. In part because this would open up today screen item development to those developers who currently don’t have experience in developing native code.

Solution Architecture

Architecture of a managed today screen item solutionMy solution utilises a native today screen item written in C++. This today screen item is implemented in a DLL called ManagedTodayScreenItem.dll. The OS is configured to load this item into the today screen process. However unlike other today screen items this one looks up additional configuration data stored in the registry to determine the name of a managed (i.e. VB.NET or C#) executable that should be launched when it is first displayed.

The managed executable starts up as normal and displays it’s main form. However once displayed the managed process then proceeds to establish an inter-process communication (IPC) channel back to the native today screen item. Once this channel is established the managed application informs the native today screen item of it’s window handle. The native today screen item then reparents the managed form to be a child of the today screen item and resizes it to fit the space allocated to the today screen item.

From this point on the illusion of a managed today screen item has been made. Whenever the managed form needs to act like a today screen item (such as painting the today screen watermark on it’s background) it can communicate with the native today screen item stub, and conversely whenever the native stub detects a change in it’s size or location it can communicate this change back to the managed part of the item.

Creating a new today screen item

Creating a new today screen item with this framework is relatively easy. Perhaps the easiest way is to modify the SampleTodayScreenItem example within the sample application mentioned below.

If you are creating a today screen item from scratch you need to follow these steps:

  1. Create a new Smart Device Application (win forms project).
  2. Change the FormBorderStyle property of the main form to None. As discussed previously this enables us to make the form non fullscreen.
  3. Add a reference to the Christec.WindowsMobile.TodayScreen.dll assembly found in the sample project below.
  4. Change the main form to derive from the TodayScreenPluginForm base class.

The last step is very important. The TodayScreenPluginForm class itself derives from Form but overrides a couple of methods (such as OnPaint) to ensure the form has the look and feel of a today screen item. This base class also behind the scenes sets up the inter-process communication channel which allows the managed part of the solution to communicate with the native part.

Your form source code should look something like the following after these changes:

using Christec.WindowsMobile.TodayScreen;
 
public Form1 : TodayScreenPluginForm
{
public Form1()
: base(4567)
{
InitializeComponent();
}
}

A key thing to point out here is the call to the TodayScreenPluginForm constructor that accepts an integer parameter. This integer is an id that is a unique value that identifies this particular today screen plugin. This is the part of the framework that enables the one native today screen item to be reutilised multiple times by different managed plugins (since each managed plugin should be given a different id value to differentiate itself).

Once the managed executable has been created as described above and compiled all that is required is a couple of registry settings to be added to make the operating system aware of the new today screen item. These registry settings are as follows:

Underneath HKLM\Software\Microsoft\Today\Items\<Name>

  • DLL = “\Windows\ManagedTodayScreenItem.dll”
  • Flags = 4567
  • Name = “A name for the item”
  • Options = 0
  • Type = 4

<Name> within the registry key above should be replaced with the name you want to be visible to the user within the Today Screen control panel applet. All these registry values should be identical for each managed today screen plugin you develop. The only difference should be the value you use for the Flags setting. This should match up with the value you passed into the TodayScreenPluginForm constructor within the source code of the managed part of your today screen item.

The native ManagedTodayScreenItem.dll today screen item utilises this “flags” value to lookup another set of item specific registry keys to determine which managed executable needs to be executed as outlined below:

Underneath HKLM\Software\ChrisTec\ManagedTodayScreenPlugins\<id>

  • (default) = “\path\to\managed\executable.exe”
  • Height = height of today screen item in pixels.

<id> within the registry key above should be replaced with the unique id value (4567 in the example) for your managed today screen item. At present it is not possible to dynamically change the height of the today screen item at runtime. This would be something that is reasonably easy to implement but is one of the features I have not implemented yet as it wasn’t required in order to prove the validity of the concept.

Sample Applicaton

[Download managedtodayscreenitem.zip - 37.1KB]

The sample project that is available for download contains two CAB files within a subdirectory called “bin”. These are as follows:

  • ChrisTec.WindowsMobile.TodayScreen-Framework.cab - installs the native part of the today screen item framework. This part can be shared among multiple managed today screen items and only needs to be installed once per device. It can be thought of as being similar to the .NET CF or SQL Server CE CAB files that install a framework for other applications to utilise. This cab file can also be utilised by managed developers who are not comfortable rebuilding the C++ source code.
  • SampleTodayScreenItem.cab - An example today screen item written in C#. It simply consists of three buttons with each button displaying a simple message box once clicked.

If both of these CAB files are installed on a Pocket PC device and the device is then soft reset you should see the new today screen item appear.

If you would like to have a go at creating your own managed today screen item you should also find a pre-compiled copy of the Christec.WindowsMobile.TodayScreen assembly that you will need to reference within this directory.

Within the other subdirectory (called “src”) you should be able to find solution files that will enable you to rebuild the two CAB files mentioned above.

Outstanding Tasks

As I stated in the introduction, this project is an early proof of concept that I have decided to share early on in the hope that it helps a few people and perhaps gets a couple interested in contributing. Since the code is not fully released there are a number of known issues and outstanding tasks.

Some of these are as follows:

  1. Slight compatibility issues on Pocket PC 2003 devices after a soft reset.
  2. Does not handle the managed application crashing in the most robust manor.
  3. The Visual Studio IDE experience could be improved with project item templates etc.
  4. Having multiple managed today screen items share the single native dll probably doesn’t work (needs a little more work).
  5. The Christec.WindowsMobile.TodayScreeen assembly should be placed into the Global Assembly Cache (GAC).
  6. It would be great if less registry configuration is required.

Summary

Hopefully this blog entry will cause some interest, as I know developing custom today screen items in managed code is a frequent question on online developer help forums. Although this solution isn’t fully complete and isn’t the most straight forward to configure (at present at-least) the results I have managed to get so far are encouraging.

If this proof of concept can validate the technique I am using to host .NET Compact Framework based forms within native processes I can see no reason why it would not work in other situations such as custom SIP based keyboards. The only difference would be the native component that would need to wrap up the native API provided by the operating system.

I would be really keen to hear your feedback and thoughts on this prototype. Especially if you are able to give me a hand to further validate and develop the concept.

posted @ 2009-02-03 15:19 Jrong 阅读(168) | 评论 (0)编辑

About Koders

Koders.com is the leading search engine for open source code. Our source code optimized search engine provides developers with an easy-to-use interface to search for source code examples and discover new open source projects which can be leveraged in their applications.

Koders Enterprise Edition enables organizations to recognize significant productivity gains by improving code reuse. Developers and managers can search, review and report on the enterprise code base in ways never before possible.

 

关于Koders

Koders.com是一个领先的开源代码搜索引擎。我们优化的开源代码搜索引擎能够提供给开发人员一个简单易用的界面来搜索开源代码示例并且发现新的开源项目,这些可能会对他们所开发的应用起到杠杆作用。

Koders Enterprise Edition 能够使开发组织认识到促进代码重用带来的巨大生产力。开发人员和管理者可以以前所未有的方式搜索、修订、报告企业的代码。

 

IDE VS2005 - 2008 插件下载:http://www.koders.com/downloads/IDEplugins/KodersAddinVS2005_2008-1.1.836.msi

就是我下载安装了出错:值不在预期的范围内,看有谁知道解决方法了。

posted @ 2009-02-03 11:29 Jrong 阅读(73) | 评论 (0)编辑