<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-19142344</id><updated>2008-08-16T12:16:26.783+08:00</updated><title type='text'>.NET Compact Framework Tutorials</title><link rel='alternate' type='text/html' href='http://netcf2.blogspot.com/'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/posts/default'/><author><name>danchong</name><uri>http://www.blogger.com/profile/12935398754747138118</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>20</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-19142344.post-113660717073917399</id><published>2006-01-07T11:36:00.000+08:00</published><updated>2006-03-06T13:02:11.316+08:00</updated><title type='text'>MSMQ Message Queueing in Compact Framework (part 1)</title><content type='html'>In this tutorial, we write a simple MSMQ application for a Windows Mobile device. The application automatically installs the MSMQ service if it's not already present. A simple interface is provided to let the user send and receive messages via MSMQ.
&lt;br/&gt;&lt;br/&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/compact_framework_msmq_0a.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/compact_framework_msmq_0a.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;span class="fullpost"&gt;
&lt;br/&gt;&lt;br/&gt;
MSMQ is a Microsoft message queueing technology that allows disparate applications, not necessarily running in the same machine, to send messages to one another. Part of this store-and-forward technology is a failsafe mechanism to ensure &lt;span style="font-weight: bold;"&gt;guaranteed delivery&lt;/span&gt; (&lt;span style="font-style: italic;"&gt;well, to an extent&lt;/span&gt;). Message priorities can also be set as well.
&lt;br/&gt;&lt;br/&gt;
One of the strongest competitors to Microsoft, in terms of providing message queueing middleware, remains to be IBM, which offers the product called WebSphere MQ (&lt;span style="font-style: italic;"&gt;previously called IBM MQSeries&lt;/span&gt;).
&lt;br/&gt;&lt;br/&gt;
This tutorial is based on Mark Ihimoyan's posts in his excellent &lt;a href="http://blogs.msdn.com/ihimmar/default.aspx" target="_blank"&gt;blog&lt;/a&gt;.

&lt;ol&gt;&lt;li&gt;As usual, start Visual Studio and create a new smart device project.&lt;/li&gt;&lt;li&gt;In Solution Explorer, right-click on References, and add the reference to System.Messaging component. We need this reference as we are using the Messaging classes later.&lt;/li&gt;&lt;li&gt;Change the form property MinimizeBox to false, so that the use can close the application easily.&lt;/li&gt;&lt;li&gt;Add a TextBox, 2 Buttons and a Label to the form, naming them txtSendMsg, btnSend, btnReceive and lblReceiveMsg respectively. The first button lets the user send the message in the textbox to a message queue. The second button receives a message from the queue. Even if the user closes the application, the stored messages in the queue remain intact and can be received when the application is restarted (&lt;span style="font-style: italic;"&gt;however, a soft reset clears the queue&lt;/span&gt;).&lt;/li&gt;&lt;li&gt;Next, we want to make the application self-contained, in that it will check for the presence of the MSMQ service and automatically installs it if it is not detected.&lt;/li&gt;&lt;li&gt;Go to &lt;a href="http://msdn.microsoft.com/mobility/windowsmobile/downloads/default.aspx" target="_blank"&gt;Microsoft Mobile Development Center&lt;/a&gt; and follow the link "Redistributable Server Components for Windows Mobile 5.0" to download the package. We need the msmq.ARM.CAB file in the package.&lt;/li&gt;&lt;li&gt;After downloading, extract the msmq.ARM.CAB file (&lt;span style="font-style: italic;"&gt;under msmq folder in the downloaded package&lt;/span&gt;). This is the cab file that installs the MSMQ service in the device.&lt;/li&gt;&lt;li&gt;Back in Visual Studio, right-click on your project in Solution Explorer and add msmq.ARM.CAB to your project (&lt;span style="font-style: italic;"&gt;use Add-&gt; Existing Item...&lt;/span&gt;). Then click on msmq.ARM.CAB in Solution Explorer and change its "Copy to Output Directory" property to "Copy if newer". This will ensure that the cab file is copied over to the program folder in the device.&lt;/li&gt;&lt;li&gt;In your form code, import the namespaces:&lt;/li&gt;

&lt;blockquote  style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;
using System.IO;&lt;br/&gt;
using System.Messaging;&lt;br/&gt;
using System.Runtime.InteropServices;&lt;br/&gt;
&lt;/span&gt;&lt;/blockquote&gt;

&lt;li&gt;Then within the form partial class, add the following declarations needed to P/Invoke the CreateProcess Win32 function. We need to call CreateProcess to install the cab.&lt;/li&gt;

&lt;blockquote  style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;
public class ProcessInfo&lt;br/&gt;
{&lt;br/&gt;
&amp;nbsp;&amp;nbsp;public IntPtr hProcess;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;public IntPtr hThread;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;public Int32 ProcessId;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;public Int32 ThreadId;&lt;br/&gt;
}&lt;br/&gt;
&lt;br/&gt;
[DllImport("CoreDll.DLL", SetLastError = true)]&lt;br/&gt;
private extern static&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;int CreateProcess(String imageName,&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;String cmdLine,&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IntPtr lpProcessAttributes,&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IntPtr lpThreadAttributes,&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Int32 boolInheritHandles,&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Int32 dwCreationFlags,&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IntPtr lpEnvironment,&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IntPtr lpszCurrentDir,&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IntPtr lpsiStartInfo,&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ProcessInfo pi);&lt;br/&gt;
[DllImport("CoreDll.dll")]&lt;br/&gt;
private extern static&amp;nbsp;&amp;nbsp;Int32 GetLastError();&lt;br/&gt;
&lt;br/&gt;
[DllImport("CoreDll.dll")]&lt;br/&gt;
private extern static&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Int32 GetExitCodeProcess(IntPtr hProcess, out Int32 exitcode);&lt;br/&gt;
&lt;br/&gt;
[DllImport("CoreDll.dll")]&lt;br/&gt;
private extern static&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Int32 CloseHandle(IntPtr hProcess);&lt;br/&gt;
&lt;br/&gt;
[DllImport("CoreDll.dll")]&lt;br/&gt;
private extern static&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IntPtr ActivateDevice(&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string lpszDevKey,&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Int32 dwClientInfo);&lt;br/&gt;
&lt;br/&gt;
[DllImport("CoreDll.dll")]&lt;br/&gt;
private extern static&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Int32 WaitForSingleObject(IntPtr Handle,&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Int32 Wait);&lt;br/&gt;
&lt;br/&gt;
public static bool CreateProcess(String ExeName, String CmdLine)&lt;br/&gt;
{&lt;br/&gt;
&amp;nbsp;&amp;nbsp;Int32 INFINITE;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;unchecked { INFINITE = (int)0xFFFFFFFF; }&lt;br/&gt;
&amp;nbsp;&amp;nbsp;ProcessInfo pi = new ProcessInfo();&lt;br/&gt;
&amp;nbsp;&amp;nbsp;if (CreateProcess(ExeName, CmdLine, IntPtr.Zero, IntPtr.Zero,&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0, 0, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, pi) == 0)&lt;br/&gt;
&amp;nbsp;&amp;nbsp;{&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return false;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;}&lt;br/&gt;
&amp;nbsp;&amp;nbsp;WaitForSingleObject(pi.hProcess, INFINITE);&lt;br/&gt;
&amp;nbsp;&amp;nbsp;Int32 exitCode;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;if (GetExitCodeProcess(pi.hProcess, out exitCode) == 0)&lt;br/&gt;
&amp;nbsp;&amp;nbsp;{&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MessageBox.Show("Failure in GetExitCodeProcess");&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CloseHandle(pi.hThread);&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CloseHandle(pi.hProcess);&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return false;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;}&lt;br/&gt;
&amp;nbsp;&amp;nbsp;CloseHandle(pi.hThread);&lt;br/&gt;
&amp;nbsp;&amp;nbsp;CloseHandle(pi.hProcess);&lt;br/&gt;
&amp;nbsp;&amp;nbsp;if (exitCode != 0)&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return false;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;else&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return true;&lt;br/&gt;
}
&lt;/span&gt;&lt;/blockquote&gt;

&lt;li&gt;In the Form Load event handler (&lt;span style="font-style: italic;"&gt;remember to generate the event handler stub by double-clicking on the form in design mode; similarly for the button click event handlers later&lt;/span&gt;), enter the following code which checks for and installs the MSMQ service.&lt;/li&gt;

&lt;blockquote  style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;
string MSMQ_ADM = @"\windows\msmqadm.exe";&lt;br/&gt;
if (!CreateProcess(MSMQ_ADM, "status"))&lt;br/&gt;
{&lt;br/&gt;
&amp;nbsp;&amp;nbsp;if (!File.Exists(MSMQ_ADM) ||&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; !File.Exists(@"\windows\msmqd.dll") ||&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; !File.Exists(@"\windows\msmqrt.dll"))&lt;br/&gt;
&amp;nbsp;&amp;nbsp;{&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//install msmq&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string _path = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string docname = _path + "\\msmq.ARM.CAB";&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CreateProcess("wceload.exe", "/noui \"" + _path + "\\msmq.ARM.CAB\"");&lt;br/&gt;
&amp;nbsp;&amp;nbsp;}&lt;br/&gt;
&amp;nbsp;&amp;nbsp;//check again&lt;br/&gt;
&amp;nbsp;&amp;nbsp;if (!File.Exists(@"\windows\msmqadm.exe"))&lt;br/&gt;
&amp;nbsp;&amp;nbsp;{&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MessageBox.Show("failed to install msmq cab");&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Close();&lt;br/&gt;
&amp;nbsp;&amp;nbsp;}&lt;br/&gt;
&amp;nbsp;&amp;nbsp;else //register, start and activate service&lt;br/&gt;
&amp;nbsp;&amp;nbsp;{&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CreateProcess(MSMQ_ADM, "register cleanup");&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (CreateProcess(MSMQ_ADM, "register install")&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;amp;&amp;amp; CreateProcess(MSMQ_ADM, "register") &lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;amp;&amp;amp; CreateProcess(MSMQ_ADM, "enable binary"))&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IntPtr handle = ActivateDevice(@"Drivers\BuiltIn\MSMQD", 0);//device registry key&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CloseHandle(handle);&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (CreateProcess(MSMQ_ADM, "status")) return; //success&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MessageBox.Show("failed to start msmq");&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Close();&lt;br/&gt;
&amp;nbsp;&amp;nbsp;}&lt;br/&gt;
}
&lt;/span&gt;&lt;/blockquote&gt;

&lt;li&gt;In the btnSend click event handler, enter the following code to send a message to the "testq" queue.&lt;/li&gt;

&lt;blockquote  style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;
if (txtSendMsg.Text.Trim() == "") return;&lt;br/&gt;
string strDestQ = @".\private$\testq"; //queue name&lt;br/&gt;
try&lt;br/&gt;
{&lt;br/&gt;
&amp;nbsp;&amp;nbsp;if (!MessageQueue.Exists(strDestQ))&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MessageQueue.Create(strDestQ);&lt;br/&gt;
&amp;nbsp;&amp;nbsp;MessageQueue mq = new MessageQueue(strDestQ);&lt;br/&gt;
&amp;nbsp;&amp;nbsp;mq.Send(txtSendMsg.Text);&lt;br/&gt;
&amp;nbsp;&amp;nbsp;txtSendMsg.Text = "";&lt;br/&gt;
}&lt;br/&gt;
catch { }
&lt;/span&gt;&lt;/blockquote&gt;

&lt;li&gt;Finally, in the btnReceive click event handler, we will receive the frontmost message in the "testq" queue. Note that we are setting a simple timeout of 1 second (&lt;span style="font-style: italic;"&gt;so the UI is not blocked for too long&lt;/span&gt;) in case there isn't any message in the queue.&lt;/li&gt;

&lt;blockquote  style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;
lblReceiveMsg.Text = ""; Refresh();&lt;br/&gt;
MessageQueue mq = new MessageQueue(@".\private$\testq");&lt;br/&gt;
//set formatter for deserializing message&lt;br/&gt;
mq.Formatter = new XmlMessageFormatter(new Type[] { typeof(String) });&lt;br/&gt;
try&lt;br/&gt;
{&lt;br/&gt;
&amp;nbsp;&amp;nbsp;Message messageReceived = mq.Receive(new TimeSpan(0, 0, 1));//timeout in 1s&lt;br/&gt;
&amp;nbsp;&amp;nbsp;lblReceiveMsg.Text = (string)messageReceived.Body;&lt;br/&gt;
}&lt;br/&gt;
catch { lblReceiveMsg.Text = "- timeout -"; }
&lt;/span&gt;&lt;/blockquote&gt;

&lt;li&gt;We are done! Deploy and run. The first time you run, there is quite a long delay on form load, as the application is invoking wceload.exe to install the MSMQ service. When the form is loaded, type something in the textbox and click the Send button. Send a few more messages. Then click the Receive button a few times.&lt;/li&gt;&lt;li&gt;Try closing and reopening the application and test if sent messages are still receivable. What about the effect of doing a soft reset?
&lt;/li&gt;&lt;/ol&gt;
In part 2, coming soon, we will send MSMQ messages across the network. Watch this space.
&lt;br/&gt;&lt;br/&gt;
&lt;span style="font-size:85%;"&gt;Categories: [&lt;a href="http://search.blogger.com/?ie=UTF-8&amp;ui=blg&amp;amp;bl_url=netcf2.blogspot.com&amp;x=0&amp;amp;y=0&amp;scoring=d&amp;amp;as_q=%22MSMQ_%22"&gt;MSMQ_&lt;/a&gt;] [&lt;a href="http://search.blogger.com/?ie=UTF-8&amp;ui=blg&amp;amp;bl_url=netcf2.blogspot.com&amp;x=0&amp;amp;y=0&amp;scoring=d&amp;amp;as_q=%22Networking_%22"&gt;Networking_&lt;/a&gt;]
Tags: [&lt;a href="http://www.technorati.com/tags/netcf2" rel="tag"&gt;netcf2&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/compact+framework" rel="tag"&gt;Compact Framework&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/msmq" rel="tag"&gt;MSMQ&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/networking" rel="tag"&gt;Networking&lt;/a&gt;]&lt;/span&gt;&lt;/span&gt;</content><link rel='alternate' type='text/html' href='http://netcf2.blogspot.com/2006/01/msmq-message-queueing-in-compact.html' title='MSMQ Message Queueing in Compact Framework (part 1)'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19142344&amp;postID=113660717073917399&amp;isPopup=true' title='20 Comments'/><link rel='replies' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/113660717073917399/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/posts/default/113660717073917399'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19142344/posts/default/113660717073917399'/><author><name>danchong</name><uri>http://www.blogger.com/profile/12935398754747138118</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-19142344.post-113628915763829588</id><published>2006-01-03T10:57:00.000+08:00</published><updated>2006-01-07T13:16:34.883+08:00</updated><title type='text'>Create a SQL Mobile database (part 1)</title><content type='html'>I recently conducted a small poll and it turns out that SQL Mobile is the most requested topic (see ongoing voting results &lt;a href="http://netcf2.blogspot.com/2005/12/vote-or-suggest-tutorial-topic.html"&gt;here&lt;/a&gt;). So in this tutorial, we will cover how to &lt;span style="font-weight: bold;"&gt;create a SQL Mobile database&lt;/span&gt; for the PDA or emulator.&lt;span class="fullpost"&gt;
&lt;br/&gt;&lt;br/&gt;
Having seen the SQL Server Express (mentioned &lt;a href="http://netcf2.blogspot.com/2005/12/accessing-sql-server-express-from.html"&gt;here&lt;/a&gt;), let's now look at SQL Mobile.
&lt;br/&gt;&lt;br/&gt;
Being the successor of SQL Server CE 2.0, SQL Mobile is Microsoft's lightweight database server that has a small enough footprint (~1.5MB) to fit and run smoothly in a Pocket PC device. It is included in Visual Studio .NET 2005, so you don't have to install anything as a developer. For end users, SQL Mobile can be installed on the Pocket PC 2003, Windows Mobile 5.0, Smartphone 5.0 as well as Windows CE 5.0 platforms. Word has it that SQL Mobile will be pre-installed in the ROM of all new Windows Mobile devices, just like Compact Framework 2.0.
&lt;br/&gt;&lt;br/&gt;
In terms of features, SQL Mobile offers transactional support, multi-user access, as well as synchronization and replication with back-end servers. In terms of competition, I'm not too sure if these few players are still fighting close: Sybase SQL Anywhere, Oracle Lite and IBM DB2 Everyplace.
&lt;br/&gt;&lt;br/&gt;
Alright, let's dive in to create our very first SQL Mobile database.
&lt;br/&gt;&lt;br/&gt;
&lt;ol&gt;
&lt;li&gt;Start Visual Studio and create a new smart device project.&lt;/li&gt;
&lt;li&gt;Click Data in the menu and select "Add New Data Source..." to see the following dialog window.
&lt;/li&gt;
&lt;br/&gt;&lt;br/&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/compact_framework_sql_mobile_1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/compact_framework_sql_mobile_1.jpg" alt="" border="0" /&gt;&lt;/a&gt;
&lt;br/&gt;
&lt;li&gt;Select the Database icon (to indicate that you are creating a database) and click Next.&lt;/li&gt;
&lt;li&gt;In the next screen, click "New Connection..." to create a new database.&lt;/li&gt;
&lt;li&gt;In the the pop-up "Add Connection" window, click "Change..." to select a data source type. You should see the following:
&lt;/li&gt;
&lt;br/&gt;&lt;br/&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/compact_framework_sql_mobile_2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/compact_framework_sql_mobile_2.jpg" alt="" border="0" /&gt;&lt;/a&gt;
&lt;br/&gt;
&lt;li&gt;Select "Microsoft SQL Server Mobile Edition" as the Data Source and leave the Data provider as ".NET Framework Data Provider for SQL Server Mobile Edition". Click OK.
&lt;/li&gt;
&lt;li&gt;Back at the "Add Connection" dialog, leave "My Computer" radiobutton selected, and then click "Create" to specify the filename of the SQL Mobile database. Enter "C:\FirstDB.sdf" for the filename and leave the other fields as they are (you can also specify the password here, but we leave it empty for convenience).&lt;/li&gt;
&lt;br/&gt;&lt;br/&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/compact_framework_sql_mobile_3.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/compact_framework_sql_mobile_3.jpg" alt="" border="0" /&gt;&lt;/a&gt;
&lt;br/&gt;
&lt;li&gt;Click OK. If prompted on the empty password, click Yes.&lt;/li&gt;&lt;li&gt;You may now click "Test Connection" to check if the database is in order.&lt;/li&gt;&lt;li&gt;Click OK. Back at the first dialog window, click Next, and click Yes to add the database file to your project. In the next screen, click Cancel as we are not using generated DataSets in this tutorial.
&lt;/li&gt;
&lt;li&gt;You will notice that the FirstDB.sdf has been added to your project. Click on it and press F4 to check that its "Copy to Output Directory" property is "Copy if newer". This means that the file will be copied to the emulator if the emulator does not have a copy or have an older copy.
&lt;/li&gt;
&lt;li&gt;Now, from the menu, click View-&gt; Server Explorer. And in the Server Explorer pane, click the "Connect to Database" icon (2nd icon from the right; or move your mouse over each icon to see the tooltip).&lt;/li&gt;
&lt;li&gt;Click Browse and go to your &lt;span style="font-weight: bold;"&gt;project folder&lt;/span&gt; and select the FirstDB.sdf file. (&lt;span style="font-style: italic;"&gt;Note that you can also create a database here, but care must be taken to add the created file to your project.&lt;/span&gt;)&lt;/li&gt;&lt;li&gt;Test the connection and click OK.&lt;/li&gt;&lt;li&gt;In the Server Explorer pane, expand the tree, right-click on Tables and select "Create Table". Enter the table name and create 2 columns for it, as shown below. Click on the image below to zoom in. (Note that the custid column has Identity set to true, so that this column's value for each record is auto-generated.)
&lt;/li&gt;
&lt;br/&gt;&lt;br/&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/compact_framework_sql_mobile_4.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/compact_framework_sql_mobile_4.jpg" alt="" border="0" /&gt;&lt;/a&gt;
&lt;br/&gt;
&lt;li&gt;Click OK.&lt;/li&gt;&lt;li&gt;Finally, run your program.&lt;/li&gt;&lt;li&gt;There's nothing interesting in your form. However, open File Explorer and browse to the folder which contains the deployed files (at \Program Files\yourProjName). You should see a file with the name "FirstDB" there. The .sdf extension is not displayed. Click on this file to open it with Query Analyzer. Query Analyzer allows you to explore and manage SQL Mobile databases from within the PDA environment.
&lt;/li&gt;&lt;li&gt;In Query Analyzer, expand the tree under the Objects tab. You should see this:&lt;/li&gt;
&lt;br/&gt;&lt;br/&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/compact_framework_sql_mobile_5.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/compact_framework_sql_mobile_5.jpg" alt="" border="0" /&gt;&lt;/a&gt;
&lt;br/&gt;
&lt;li&gt;That's it! You have created a simple SQL Mobile database and transferred it to the emulator/device. Part 2, coming soon, will cover how to create a SQL Mobile database programmatically.
&lt;/li&gt;&lt;/ol&gt;
&lt;span style="font-size:85%;"&gt;Categories: [&lt;a href="http://search.blogger.com/?ie=UTF-8&amp;ui=blg&amp;amp;bl_url=netcf2.blogspot.com&amp;x=0&amp;amp;y=0&amp;scoring=d&amp;amp;as_q=%22Data%20Access_%22"&gt;Data Access_&lt;/a&gt;]
Tags: [&lt;a href="http://www.technorati.com/tags/netcf2" rel="tag"&gt;netcf2&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/compact+framework" rel="tag"&gt;Compact Framework&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/sql+server+mobile" rel="tag"&gt;SQL Server Mobile&lt;/a&gt;]&lt;/span&gt;&lt;/span&gt;</content><link rel='alternate' type='text/html' href='http://netcf2.blogspot.com/2006/01/create-sql-mobile-database-part-1.html' title='Create a SQL Mobile database (part 1)'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19142344&amp;postID=113628915763829588&amp;isPopup=true' title='17 Comments'/><link rel='replies' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/113628915763829588/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/posts/default/113628915763829588'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19142344/posts/default/113628915763829588'/><author><name>danchong</name><uri>http://www.blogger.com/profile/12935398754747138118</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-19142344.post-113622137654542131</id><published>2006-01-03T00:20:00.000+08:00</published><updated>2006-01-03T01:09:22.710+08:00</updated><title type='text'>Plasma or LCD TV?</title><content type='html'>Two years ago, the choice was clear. Just by comparing their response times, Plasma television sets won hands down, never mind the burn-ins. LCD TVs were simply too slow and left streaks of image blurs when viewing action movies. Fast forward to today. Have things changed?&lt;span class="fullpost"&gt;
&lt;br/&gt;&lt;br/&gt;
&lt;script type="text/javascript"&gt;&lt;!--
ch_client = "firec";
ch_width = 468;
ch_height = 60;
ch_color_border = "#efffff";
ch_color_bg = "#efffff";
ch_color_title = "#0000FF";
ch_color_text = "#333333";
ch_non_contextual = 1;
ch_sid = "lcd";
var ch_queries = new Array( "plasma" );
var ch_selected=Math.floor((Math.random()*ch_queries.length));
ch_query = ch_queries[ch_selected];
//--&gt;&lt;/script&gt;
&lt;script  src="http://scripts.chitika.net/eminimalls/mm.js" type="text/javascript"&gt;
&lt;/script&gt;
&lt;br/&gt;&lt;br/&gt;
The &lt;b&gt;response time&lt;/b&gt; problem for LCD television is &lt;b&gt;no longer an issue&lt;/b&gt;, with some models (in particular Sharp Aquos) even boasting a remarkable 4ms in their specifications. Although &lt;b&gt;Plasma TVs still have more vivid colors&lt;/b&gt;, LCDs have surpassed them in terms of viewing angles. &lt;b&gt;Some LCD models even have wider viewing angles&lt;/b&gt; than the typical 170 degrees that Plasmas offer. The Sony Bravia, for example, offers a 178-degree viewing angle.
&lt;br/&gt;&lt;br/&gt;
&lt;b&gt;LCD models have a longer lifespan&lt;/b&gt; of 65,000 hours, almost twice longer than that of Plasmas. To be fair, a few Plasmas also claim to have a 60k-hour lifespan, but these are the exception rather than the norm. Moreover, &lt;b&gt;LCD TVs have replaceable fluorescent tubes&lt;/b&gt;, allowing for even longer extended operation. In contrast, there's &lt;b&gt;nothing in Plasmas that can be easily and affordably replaced&lt;/b&gt;.
&lt;br/&gt;&lt;br/&gt;
&lt;div style="text-align:center"&gt;
&lt;script type="text/javascript"&gt;&lt;!--
ch_client = "firec";
ch_width = 300;
ch_height = 250;
ch_color_border = "#efffff";
ch_color_bg = "#efffff";
ch_color_title = "#0000FF";
ch_color_text = "#333333";
ch_non_contextual = 1;
ch_sid = "lcd";
var ch_queries = new Array( "lcd tv","flat panel" );
var ch_selected=Math.floor((Math.random()*ch_queries.length));
ch_query = ch_queries[ch_selected];
//--&gt;&lt;/script&gt;
&lt;script  src="http://scripts.chitika.net/eminimalls/mm.js" type="text/javascript"&gt;
&lt;/script&gt;
&lt;/div&gt;
&lt;br/&gt;&lt;br/&gt;
Finally, Plasma TVs are in general &lt;b&gt;a lot heavier than LCD TVs&lt;/b&gt;, and &lt;b&gt;Plasmas still suffer from burn-ins&lt;/b&gt; (images get permanently etched on the screen when left displayed for too long). Price-wise, both are on par. LCDs have the added advantage of being &lt;b&gt;more energy efficient&lt;/b&gt;. So, all other things equal, I will definitely go for an LCD. Won't you?
&lt;br/&gt;&lt;br/&gt;
&lt;span style="font-size:85%;"&gt;Categories: [&lt;a href="http://search.blogger.com/?ie=UTF-8&amp;ui=blg&amp;bl_url=netcf2.blogspot.com&amp;x=0&amp;y=0&amp;scoring=d&amp;as_q=%22blogging_%22"&gt;Blogging_&lt;/a&gt;]
Tags: [&lt;a href="http://www.technorati.com/tags/LCD" rel="tag"&gt;LCD&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/plasma" rel="tag"&gt;Plasma&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/flat+panel" rel="tag"&gt;Flat Panel&lt;/a&gt;]&lt;/span&gt;&lt;/span&gt;</content><link rel='alternate' type='text/html' href='http://netcf2.blogspot.com/2006/01/plasma-or-lcd-tv.html' title='Plasma or LCD TV?'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19142344&amp;postID=113622137654542131&amp;isPopup=true' title='5 Comments'/><link rel='replies' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/113622137654542131/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/posts/default/113622137654542131'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19142344/posts/default/113622137654542131'/><author><name>danchong</name><uri>http://www.blogger.com/profile/12935398754747138118</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-19142344.post-113481480870369730</id><published>2005-12-28T18:14:00.000+08:00</published><updated>2005-12-28T14:54:56.676+08:00</updated><title type='text'>Co-founder of OpenNETCF mentions my blog!</title><content type='html'>I'm delighted to say that Neil Cowburn, co-founder of OpenNETCF.org, has put up a short &lt;a href="http://blog.opennetcf.org/ncowburn/PermaLink,guid,60a0b43c-6497-41f1-a3f3-04bd65781db7.aspx" target="_blank"&gt;plug&lt;/a&gt; for my compact framework tutorials blog. In his words, my blog is "&lt;span style="font-style: italic;"&gt;very well worth a read if you are looking to get into Smart Device development.&lt;/span&gt;"
&lt;span class="fullpost"&gt;&lt;br/&gt;&lt;br/&gt;
Thanks, Neil! You made my day.
&lt;br/&gt;&lt;br/&gt;
&lt;span style="font-size:85%;"&gt;Categories: [&lt;a href="http://search.blogger.com/?ie=UTF-8&amp;ui=blg&amp;amp;bl_url=netcf2.blogspot.com&amp;x=0&amp;amp;y=0&amp;scoring=d&amp;amp;as_q=%22Blogging_%22"&gt;Blogging_&lt;/a&gt;]
Tags: [&lt;a href="http://www.technorati.com/tags/netcf2" rel="tag"&gt;netcf2&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/compact+framework" rel="tag"&gt;Compact Framework&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/windows+mobile" rel="tag"&gt;Windows Mobile&lt;/a&gt;]&lt;/span&gt;&lt;/span&gt;</content><link rel='alternate' type='text/html' href='http://netcf2.blogspot.com/2005/12/co-founder-of-opennetcf-mentions-my.html' title='Co-founder of OpenNETCF mentions my blog!'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19142344&amp;postID=113481480870369730&amp;isPopup=true' title='1 Comments'/><link rel='replies' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/113481480870369730/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/posts/default/113481480870369730'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19142344/posts/default/113481480870369730'/><author><name>danchong</name><uri>http://www.blogger.com/profile/12935398754747138118</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-19142344.post-113466395771664897</id><published>2005-12-15T23:43:00.000+08:00</published><updated>2006-01-03T19:58:14.376+08:00</updated><title type='text'>Accessing SQL Server Express from the emulator (or PDA)</title><content type='html'>This post talks about data access from the emulator (or actual device) to your PC. If you're just getting started on the .NET Compact Framework 2.0, you can read &lt;a href="http://netcf2.blogspot.com/2005/11/getting-started-install-tools.html"&gt;this&lt;/a&gt; to install the tools and &lt;a href="http://netcf2.blogspot.com/2005/11/getting-started-your-first-app.html"&gt;this&lt;/a&gt; to write your first app.
&lt;br/&gt;&lt;br/&gt;
In this tutorial, you learn how to let the emulator access a SQL Server Express database in your PC.
&lt;span class="fullpost"&gt;
&lt;br/&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/compact_framework_data_access.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/compact_framework_data_access.jpg" alt="" border="0" /&gt;&lt;/a&gt;
&lt;br/&gt;
SQL Server 2005 &lt;a href="http://msdn.microsoft.com/vstudio/express/sql/" target="_blank"&gt;Express&lt;/a&gt; edition is free and is installed together with most editions of Visual Studio 2005. As the successor of the very useful MSDE, SQL Server Express offers the equivalent, if not better, feature set of other free database servers (&lt;span style="font-style: italic;"&gt;MySQL in particular&lt;/span&gt;). Compared to MSDE, SQL Server Express does not have the workload throttle restriction, thus giving better scalability, and allows a higher maximum database size of 4GB (an increase of 2GB). However, the new kid on the block always uses only a single CPU (even if the machine has multiple), and supports only replication subscriptions (it can't be a publisher). Still, it is extremely useful for basic development and exploration, in my opinion. It even comes with a management console (currently in Community Technology Preview, downloadable from a link on this &lt;a href="http://www.microsoft.com/sql/editions/express/default.mspx" target="_blank"&gt;page&lt;/a&gt;), something that its predecessor lacks.
&lt;br/&gt;&lt;br/&gt;
&lt;script type="text/javascript"&gt;&lt;!--
ch_client = "firec";
ch_width = 468;
ch_height = 60;
ch_color_border = "#efffff";
ch_color_bg = "#efffff";
ch_color_title = "#0000FF";
ch_color_text = "#333333";
ch_non_contextual = 1;
ch_sid = "sql";
var ch_queries = new Array( "sql server 2005 developer" );
var ch_selected=Math.floor((Math.random()*ch_queries.length));
ch_query = ch_queries[ch_selected];
//--&gt;&lt;/script&gt;
&lt;script  src="http://scripts.chitika.net/eminimalls/mm.js" type="text/javascript"&gt;
&lt;/script&gt;
&lt;br/&gt;&lt;br/&gt;
Now, let's dive in! This step-by-step tutorial requires a sample database such as Northwind.mdf (which can be extracted from a download &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=06616212-0356-46A0-8DA2-EEBC53A68034&amp;displaylang=en" target="_blank"&gt;here&lt;/a&gt;). Although Northwind was created for SQL Server 2000, it can also be used in SQL Server 2005.
&lt;br/&gt;&lt;br/&gt;
&lt;ol&gt;&lt;li&gt;You should have downloaded and extracted the Northwind sample database (download from &lt;a href="http://www.microsoft.com/downloads/thankyou.aspx?familyId=06616212-0356-46A0-8DA2-EEBC53A68034&amp;amp;displayLang=en&amp;oRef=" target="_blank"&gt;here&lt;/a&gt;). Place both Northwind.mdf and Northwind.ldf files in a folder of your choice.&lt;/li&gt;&lt;li&gt;Download and install the Management Studio Express from a link on this &lt;a href="http://www.microsoft.com/sql/editions/express/default.mspx" target="_blank"&gt;page&lt;/a&gt;. Start the Management Studio and login using Windows Authentication. Right-click on the first node in the treeview and click "Properties". In the dialog window, click "Security" on the left and select "SQL Server and Windows Authentication". This will allow connections to be made using SQL Server authentication.&lt;/li&gt;&lt;li&gt;Next, still in Management Studio, expand the Security node in treeview, then expand Logins. In the main panel, right-click on "sa" and click "Properties". Change the password. Still within Properties dialog, click "Status" in the leftside panel, and enable the "sa" account. Click OK.&lt;/li&gt;&lt;li&gt;Right-click on Databases, and attach the Northwind database.
&lt;/li&gt;&lt;li&gt;Next, we need to enable TCP/IP connections. Click Start-&gt; All Programs-&gt; SQL Server 2005-&gt; Configuration Tools-&gt; SQL Server Configuration Manager.&lt;/li&gt;&lt;li&gt;Under "Protocols for SQLEXPRESS", ensure that "TCP/IP" is enabled. Double-click on TCP/IP, set Enabled to Yes, and under the "IP Addresses" tab, clear all the "TCP Dynamic Ports" entries (set them blank), and set TCP Port (under IP All) to 1433. We are fixing the port, which means SQL Browser service can be stopped (in fact, this is a security best practice). You may need to use another port number if you have other versions/instances of SQL Server running.&lt;/li&gt;&lt;li&gt;Restart the SQL Express service to activate the new configurations.
&lt;/li&gt;&lt;li&gt;Start Visual Studio and create a new smart device project.&lt;/li&gt;&lt;li&gt;Add a ComboBox called cboCountries to the form. Add the reference System.Data.SqlClient to your project. In code view, add the line "using System.Data.SqlClient;" near the top.
&lt;/li&gt;&lt;li&gt;In the Form_Load event handler, add the following code (replacing "192.1.2.3" with your IP address, and "yourPassword" with the password for your sa account:&lt;/li&gt;
&lt;br/&gt;
&lt;blockquote&gt;
&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;
string sConnection = "Data Source=192.1.2.3,1433;Initial Catalog=Northwind;User ID=sa;Password=yourPassword;";&lt;br/&gt;
string sSQL = "SELECT DISTINCT Country FROM Customers ORDER BY Country";&lt;br/&gt;
SqlCommand comm = new SqlCommand(sSQL, new SqlConnection(sConnection));&lt;br/&gt;
SqlDataReader dr = null;&lt;br/&gt;
try&lt;br/&gt;
{&lt;br/&gt;
&amp;nbsp;&amp;nbsp;comm.Connection.Open();&lt;br/&gt;
&amp;nbsp;&amp;nbsp;dr = comm.ExecuteReader();&lt;br/&gt;
&amp;nbsp;&amp;nbsp;while (dr.Read())&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cboCountries.Items.Add(dr[0]);&lt;br/&gt;
}&lt;br/&gt;
catch (Exception e)&lt;br/&gt;
{&lt;br/&gt;
&amp;nbsp;&amp;nbsp;MessageBox.Show(e.Message);&lt;br/&gt;
&amp;nbsp;&amp;nbsp;return;&lt;br/&gt;
}&lt;br/&gt;
dr.Close();&lt;br/&gt;
comm.Connection.Close();&lt;br/&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/blockquote&gt;
&lt;br/&gt;
&lt;li&gt;Start the emulator and cradle it (see &lt;a href="http://netcf2.blogspot.com/2005/11/getting-started-using-emulator.html"&gt;this post&lt;/a&gt; on cradling the emulator). Make sure that it can access the network.&lt;/li&gt;&lt;li&gt;Run your program. You should see the combo box populated with a list of countries extracted from the Northwind sample database.
&lt;/li&gt;&lt;/ol&gt;
What next? Learn how to create a SQL Server &lt;b&gt;Mobile&lt;/b&gt; database &lt;a href="http://netcf2.blogspot.com/2006/01/create-sql-mobile-database-part-1.html"&gt;here&lt;/a&gt;.
&lt;br/&gt;&lt;br/&gt;
&lt;span style="font-size:85%;"&gt;Categories: [&lt;a href="http://search.blogger.com/?ie=UTF-8&amp;ui=blg&amp;amp;bl_url=netcf2.blogspot.com&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;x=0&amp;y=0&amp;amp;scoring=d&amp;as_q=%22data%20access_%22"&gt;Data Access_&lt;/a&gt;] [&lt;a href="http://search.blogger.com/?ie=UTF-8&amp;amp;ui=blg&amp;bl_url=netcf2.blogspot.com&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;x=0&amp;y=0&amp;amp;scoring=d&amp;amp;as_q=%22networking_%22"&gt;Networking_&lt;/a&gt;]
Tags: [&lt;a href="http://www.technorati.com/tags/netcf2" rel="tag"&gt;netcf2&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/compact+framework" rel="tag"&gt;Compact Framework&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/sql+server" rel="tag"&gt;SQL Server&lt;/a&gt;]&lt;/span&gt;&lt;/span&gt;</content><link rel='alternate' type='text/html' href='http://netcf2.blogspot.com/2005/12/accessing-sql-server-express-from.html' title='Accessing SQL Server Express from the emulator (or PDA)'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19142344&amp;postID=113466395771664897&amp;isPopup=true' title='30 Comments'/><link rel='replies' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/113466395771664897/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/posts/default/113466395771664897'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19142344/posts/default/113466395771664897'/><author><name>danchong</name><uri>http://www.blogger.com/profile/12935398754747138118</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-19142344.post-113561585323894768</id><published>2005-12-14T00:46:00.000+08:00</published><updated>2006-04-08T02:37:38.066+08:00</updated><title type='text'>Vote or suggest a tutorial topic</title><content type='html'>There are some compact framework tutorials that I'm thinking of writing, particularly in the area of SQL Server Mobile. However, I would like the readers of this blog to have a say. I therefore sincerely invite you to suggest or vote for a compact framework topic that you'd like to see most. To vote, click on one or more of the links in the frame below. To suggest a topic, simply type in the textbox and click the "Suggest" button. Thanks for your support.
&lt;br/&gt;&lt;br/&gt;
&lt;iframe src="http://www.mobibo.com/suggestorvote/sorry.htm" width="400" height="200" scrolling="auto" name="mysuggestion" id="myown"&gt;&lt;/iframe&gt;
&lt;span class="fullpost"&gt;
&lt;br/&gt;&lt;br/&gt;
The above "votebox" is written using ASP.NET 2.0. If you're interested in using it in your own websites/pages, kindly leave me a note (comment).
&lt;br/&gt;&lt;br/&gt;
&lt;span style="font-size:85%;"&gt;Categories: [&lt;a href="http://search.blogger.com/?ie=UTF-8&amp;ui=blg&amp;bl_url=netcf2.blogspot.com&amp;x=0&amp;y=0&amp;scoring=d&amp;as_q=%22blogging_%22"&gt;Blogging_&lt;/a&gt;]
Tags: [&lt;a href="http://www.technorati.com/tags/netcf2" rel="tag"&gt;netcf2&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/compact+framework" rel="tag"&gt;Compact Framework&lt;/a&gt;]&lt;/span&gt;&lt;/span&gt;</content><link rel='alternate' type='text/html' href='http://netcf2.blogspot.com/2005/12/vote-or-suggest-tutorial-topic.html' title='Vote or suggest a tutorial topic'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19142344&amp;postID=113561585323894768&amp;isPopup=true' title='5 Comments'/><link rel='replies' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/113561585323894768/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/posts/default/113561585323894768'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19142344/posts/default/113561585323894768'/><author><name>danchong</name><uri>http://www.blogger.com/profile/12935398754747138118</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-19142344.post-113336921666779757</id><published>2005-11-30T23:52:00.000+08:00</published><updated>2005-12-18T03:41:57.576+08:00</updated><title type='text'>Multithreaded Prime Number Generator</title><content type='html'>This is more of an intermediate topic. If you're just getting started on the .NET Compact Framework 2.0, you can read &lt;a href="http://netcf2.blogspot.com/2005/11/getting-started-install-tools.html"&gt;this&lt;/a&gt; to install the tools and &lt;a href="http://netcf2.blogspot.com/2005/11/getting-started-your-first-app.html"&gt;this&lt;/a&gt; to write your first app.
&lt;br/&gt;&lt;br/&gt;
In this tutorial, you learn how to write a multithreaded program that does some background processing and yet maintains a UI that's responsive to the user.
&lt;span class="fullpost"&gt;
&lt;br/&gt;&lt;br/&gt;
A multithreaded program is useful in that it gives the user a responsive UI and at the same time be productive in some background work, such as doing long calculations and IO. How do you decide when to start a thread? If the program is about to be engaged in some long processing, and you do not want to user to wait, then it's better to start a thread that works on the processing, while leaving the main UI thread running. This is known as &lt;span style="font-weight: bold;"&gt;threading&lt;/span&gt;.
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/compact_framework_threading_1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/compact_framework_threading_1.jpg" alt="" border="0" /&gt;&lt;/a&gt;
As usual, we will illustrate how to do threading with this simple step-by-step tutorial. We will write a program that keeps calculating prime numbers in the background, while leaving the UI responsive.
&lt;ol&gt;&lt;li&gt;
Create a C# Windows Mobile 5.0 PPC Device Application project in Visual Studio .NET 2005.&lt;/li&gt;&lt;li&gt;
Change the form's MinimizeBox property to False (so that you can easily close it by clicking the OK at the top-right corner).
&lt;/li&gt;&lt;li&gt;
Add 2 Button controls and a Label control. Call them btnStart, btnStop and label1. Set their Text properties to: "Start", "Stop" and [empty string] respectively.&lt;/li&gt;&lt;li&gt;Go to the code view (press F7). Add the line "using System.Threading;" to the top, so that your code can use the Threading namespace.&lt;/li&gt;&lt;li&gt;
Add 2 private attributes to your partial class: private string textToShow, private bool runThread.&lt;/li&gt;&lt;li&gt;
Go back to design view (press Shift-F7). Double-click on the Start button and enter the following code to start a thread.&lt;/li&gt;
&lt;blockquote  style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;
Thread t = new Thread(new ThreadStart(WorkerThread));&lt;br/&gt;
runThread = true;&lt;br/&gt;
t.Start();
&lt;/span&gt;&lt;/blockquote&gt;
&lt;li&gt;
In design view, double-click the Stop button and give it this code which informs the thread to stop:&lt;/li&gt;
&lt;blockquote  style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;
runThread = false;
&lt;/span&gt;&lt;/blockquote&gt;
&lt;li&gt;
Back in design view, select the Form, and in the Properties panel, click on the Events button (the one with the thunderbolt image on it). Double-click on the &lt;span style="font-weight: bold;"&gt;Closing&lt;/span&gt; event. We will write one line of code for the closing event of the form, also to end the thread:&lt;/li&gt;
&lt;blockquote  style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;
runThread = false;
&lt;/span&gt;&lt;/blockquote&gt;
&lt;li&gt;
Finally, add these 2 methods to the partial class:&lt;/li&gt;
&lt;blockquote  style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;
private void WorkerThread()&lt;br/&gt;
{&lt;br/&gt;
&amp;nbsp;&amp;nbsp;int n = 3;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;while (runThread)&lt;br/&gt;
&amp;nbsp;&amp;nbsp;{&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bool isPrime = true;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for (int f = 3; f &amp;lt;= Math.Sqrt(n); f += 2)&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (n % f == 0)&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;isPrime = false;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (isPrime)&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;textToShow = n.ToString();&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;this.Invoke(new EventHandler(Update_label));&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;n += 2;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;}&lt;br/&gt;
}&lt;br/&gt;
private void Update_label(object sender, EventArgs e)&lt;br/&gt;
{&lt;br/&gt;
&amp;nbsp;&amp;nbsp;label1.Text = textToShow;&lt;br/&gt;
}&lt;br/&gt;
&lt;/span&gt;&lt;/blockquote&gt;
&lt;li&gt;
Compile, deploy to emulator and run. Test it by clicking the buttons. You will see that the prime numbers are being calculated and displayed, while leaving UI not blocked (i.e. still responsive).&lt;/li&gt;&lt;li&gt;
Notice that in the code, the label can't be updated directly from the worker thread. This is because the label object belongs to the main process thread and has to be synchronously updated through an Invoke call.
&lt;/li&gt;&lt;/ol&gt;
Do you like solving Sudoku puzzles? How about &lt;a href="http://netcf2.blogspot.com/2005/11/controls-using-soft-keys-for-sudoku.html"&gt;writing a Sudoku solver&lt;/a&gt; application for your PDA?&lt;br/&gt;&lt;br/&gt;
&lt;span style="font-size:85%;"&gt;Categories: [&lt;a href="http://search.blogger.com/?ie=UTF-8&amp;ui=blg&amp;amp;bl_url=netcf2.blogspot.com&amp;x=0&amp;amp;y=0&amp;scoring=d&amp;amp;as_q=threading_"&gt;Threading_&lt;/a&gt;]
Tags: [&lt;a href="http://www.technorati.com/tags/netcf2" rel="tag"&gt;netcf2&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/compact+framework" rel="tag"&gt;Compact Framework&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/windows+mobile" rel="tag"&gt;Windows Mobile&lt;/a&gt;]
[&lt;a href="http://www.technorati.com/tags/threading" rel="tag"&gt;Threading&lt;/a&gt;]&lt;/span&gt;&lt;/span&gt;</content><link rel='alternate' type='text/html' href='http://netcf2.blogspot.com/2005/11/multithreaded-prime-number-generator.html' title='Multithreaded Prime Number Generator'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19142344&amp;postID=113336921666779757&amp;isPopup=true' title='5 Comments'/><link rel='replies' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/113336921666779757/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/posts/default/113336921666779757'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19142344/posts/default/113336921666779757'/><author><name>danchong</name><uri>http://www.blogger.com/profile/12935398754747138118</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-19142344.post-113307728654646195</id><published>2005-11-27T15:04:00.000+08:00</published><updated>2005-12-18T03:46:46.513+08:00</updated><title type='text'>Networking_: ping the emulator</title><content type='html'>This is more of an intermediate topic, which is especially useful if you're writing applications that requires networking. If you're just getting started on the .NET Compact Framework 2.0, you can read &lt;a href="http://netcf2.blogspot.com/2005/11/getting-started-install-tools.html"&gt;this&lt;/a&gt; to install the tools and &lt;a href="http://netcf2.blogspot.com/2005/11/getting-started-your-first-app.html"&gt;this&lt;/a&gt; to write your first app.
&lt;br/&gt;&lt;br/&gt;
Here's how you can ping your Windows Mobile 5.0 Pocket PC emulator:&lt;span class="fullpost"&gt;
&lt;ol&gt;   &lt;li&gt;First, ensure that you &lt;span style="font-weight: bold;"&gt;do not "cradle"&lt;/span&gt; your emulator, which is already the case &lt;span style="font-weight: bold;"&gt;by default&lt;/span&gt; (&lt;span style="font-style: italic;"&gt;so you don't have to do anything&lt;/span&gt;). If you want to know more on cradling emulators, see &lt;a href="http://netcf2.blogspot.com/2005/11/getting-started-using-emulator.html"&gt;this&lt;/a&gt;.&lt;/li&gt;   &lt;li&gt;Next, in the window that contains the emulated Pocket PC, click File-&gt; Configure. You should see the "Emulator Properties" dialog box. Under the Network tab, &lt;span style="font-weight: bold;"&gt;check the checkbox "Enable NE2000..."&lt;/span&gt;. This will &lt;span style="font-style: italic;"&gt;bind&lt;/span&gt; the emulator's network adapter to your host PC's network. (&lt;span style="font-style: italic;"&gt;If you're familiar with using Virtual PC, this is exactly the same as binding the network adapter in a Virtual Machine to the host PC's network&lt;/span&gt;).&lt;/li&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/compact_framework_networking_1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/compact_framework_networking_1.jpg" alt="" border="0" /&gt;&lt;/a&gt;
&lt;li&gt;Within the emulator, click Start-&gt; Settings-&gt; Connections (tab)-&gt; Network Cards. Check that &lt;span style="font-weight: bold;"&gt;the card connects to "Work"&lt;/span&gt;.
&lt;/li&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/compact_framework_networking_2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/compact_framework_networking_2.jpg" alt="" border="0" /&gt;&lt;/a&gt;
&lt;li&gt;Then click on the NE2000 driver and ensure that &lt;span style="font-weight: bold;"&gt;"Use server-assigned IP address" is selected&lt;/span&gt; (&lt;span style="font-style: italic;"&gt;this is assuming that you have a DHCP server in your network; if not, you need to specify a valid IP address within the same subnet as your host PC, and also configure the Name Servers&lt;/span&gt;). Click OK a few times to close the dialog boxes.
&lt;/li&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/compact_framework_networking_3.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/compact_framework_networking_3.jpg" alt="" border="0" /&gt;&lt;/a&gt;
&lt;li&gt;Still within the emulator, click Start-&gt; Settings-&gt; Connections (tab)-&gt; Connections-&gt; Advanced (tab), click "&lt;span style="font-weight: bold;"&gt;Select Networks&lt;/span&gt;" button, and change the first dropdown to "&lt;span style="font-weight: bold;"&gt;My Work Network&lt;/span&gt;". Click OK.
&lt;/li&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/compact_framework_networking_4.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/compact_framework_networking_4.jpg" alt="" border="0" /&gt;&lt;/a&gt;
&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Soft reset &lt;/span&gt;the emulator (&lt;span style="font-style: italic;"&gt;in the window containing the emulator, click File-&gt; Reset-&gt; Soft&lt;/span&gt;).&lt;/li&gt;   &lt;li&gt;To find out the IP address assigned to the emulator, click Start-&gt; Settings-&gt; Connections (tab)-&gt; Network Cards, and click on the NE2000 driver.&lt;/li&gt; 
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/compact_framework_networking_5.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/compact_framework_networking_5.jpg" alt="" border="0" /&gt;&lt;/a&gt;
&lt;li&gt;You can now ping the emulator from your host PC.
&lt;/li&gt; &lt;/ol&gt; We will explore writing networking applications some time soon. (&lt;span style="font-style: italic;"&gt;In fact, you have already written &lt;a href="http://netcf2.blogspot.com/2005/11/controls-browser-in-your-app.html"&gt;a browser app&lt;/a&gt;, which actually depends on ActiveSync as a virtual router to connect to the Internet, but the problem is that by doing so, connection initiation can only be from emulator to the network, which means you can neither ping nor connect to the emulator from outside.&lt;/span&gt;)
&lt;br/&gt;&lt;br/&gt;
&lt;span style="font-size:85%;"&gt;Categories: [&lt;a href="http://search.blogger.com/?ie=UTF-8&amp;ui=blg&amp;amp;bl_url=netcf2.blogspot.com&amp;x=0&amp;amp;y=0&amp;scoring=d&amp;amp;as_q=networking_"&gt;Networking_&lt;/a&gt;]
Tags: [&lt;a href="http://www.technorati.com/tags/netcf2" rel="tag"&gt;netcf2&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/compact+framework" rel="tag"&gt;Compact Framework&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/windows+mobile" rel="tag"&gt;Windows Mobile&lt;/a&gt;]&lt;/span&gt;&lt;/span&gt;</content><link rel='alternate' type='text/html' href='http://netcf2.blogspot.com/2005/11/networking-ping-emulator.html' title='Networking_: ping the emulator'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19142344&amp;postID=113307728654646195&amp;isPopup=true' title='3 Comments'/><link rel='replies' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/113307728654646195/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/posts/default/113307728654646195'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19142344/posts/default/113307728654646195'/><author><name>danchong</name><uri>http://www.blogger.com/profile/12935398754747138118</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-19142344.post-113292133223394654</id><published>2005-11-25T20:15:00.000+08:00</published><updated>2005-12-18T03:47:51.846+08:00</updated><title type='text'>Getting started_: new features in .NET Compact Framework 2.0</title><content type='html'>You have seen the &lt;a href="http://netcf2.blogspot.com/2005/11/getting-started-what-is-net-compact.html"&gt;introduction to the .NET Compact Framework&lt;/a&gt;. This post talks more on the latest version 2.0 of the framework.
&lt;br/&gt;&lt;br/&gt;
I shall not delve deep into the previous version of the .NET Compact Framework, but it suffices to say that it was working well, and that version 2.0 improves on it &lt;span style="font-style: italic;"&gt;a lot more&lt;/span&gt;. It's not hard to tell, looking at the &lt;span style="font-weight: bold;"&gt;new features &lt;/span&gt;the .NET Compact Framework 2.0 offers beyond it's older cousin:&lt;span class="fullpost"&gt;
&lt;ul&gt;   &lt;li style="font-weight: bold;"&gt;Additional Windows Forms features and controls&lt;/li&gt;&lt;li&gt;Anonymous methods&lt;/li&gt;&lt;li&gt;COM Interoperability (RCW)&lt;/li&gt;&lt;li&gt;Cryptographic support for MD5, SHA1, DES, 3DES, RSA&lt;/li&gt;&lt;li&gt;DataSet improvements&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;Direct3D and DirectDraw Mobile&lt;/li&gt;&lt;li&gt;Generics&lt;/li&gt;&lt;li&gt;Imrpoved threading&lt;/li&gt;&lt;li&gt;IPv6 support&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;Messsage queueing (MSMQ)&lt;/li&gt;&lt;li&gt;Networking support for NTLM, Negotiate and Kerberos authentication protocols&lt;/li&gt;&lt;li&gt;Partial classes&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;Pocket Outlook managed library&lt;/li&gt;&lt;li&gt;RegistryKey class&lt;/li&gt;&lt;li&gt;Serial port support&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;Simplified asynchronous Web Services programming model&lt;/li&gt;&lt;li&gt;SOAP 1.2 support&lt;/li&gt;&lt;li style="font-weight: bold;"&gt;Telephony managed library&lt;/li&gt;&lt;li&gt;XML improvements and support for XmlSerializer, Xpath, Schema&lt;/li&gt;&lt;/ul&gt;I'm interested in the ones that are boldfaced. Let's delve into them some time.
&lt;br/&gt;&lt;br/&gt;
&lt;span style="font-size:85%;"&gt;Categories: [&lt;a href="http://search.blogger.com/?ie=UTF-8&amp;ui=blg&amp;amp;bl_url=netcf2.blogspot.com&amp;x=0&amp;amp;y=0&amp;scoring=d&amp;amp;as_q=getting%20started_"&gt;Getting started_&lt;/a&gt;]
Tags: [&lt;a href="http://www.technorati.com/tags/netcf2" rel="tag"&gt;netcf2&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/compact+framework" rel="tag"&gt;Compact Framework&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/windows+mobile" rel="tag"&gt;Windows Mobile&lt;/a&gt;]&lt;/span&gt;&lt;/span&gt;</content><link rel='alternate' type='text/html' href='http://netcf2.blogspot.com/2005/11/getting-started-new-features-in-net.html' title='Getting started_: new features in .NET Compact Framework 2.0'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19142344&amp;postID=113292133223394654&amp;isPopup=true' title='1 Comments'/><link rel='replies' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/113292133223394654/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/posts/default/113292133223394654'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19142344/posts/default/113292133223394654'/><author><name>danchong</name><uri>http://www.blogger.com/profile/12935398754747138118</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-19142344.post-113291406021298259</id><published>2005-11-25T18:01:00.000+08:00</published><updated>2005-12-18T03:49:19.576+08:00</updated><title type='text'>Getting started_: what is the .NET Compact Framework</title><content type='html'>You have been using the &lt;span style="font-weight: bold;"&gt;Microsoft .NET Compact Framework&lt;/span&gt; (&lt;span style="font-style: italic;"&gt;let's call it &lt;span style="font-weight: bold;"&gt;Compact Framework &lt;/span&gt;for short&lt;/span&gt;) to write your &lt;a href="http://netcf2.blogspot.com/2005/11/getting-started-your-first-app.html"&gt;first Pocket PC application&lt;/a&gt;, &lt;a href="http://netcf2.blogspot.com/2005/11/controls-browser-in-your-app.html"&gt;a browser app&lt;/a&gt; and even &lt;a href="http://netcf2.blogspot.com/2005/11/controls-using-soft-keys-for-sudoku.html"&gt;a Sudoku solver app&lt;/a&gt;! Let's look at what the Compact Framework really is about.
&lt;span class="fullpost"&gt;
&lt;br/&gt;&lt;br/&gt;
As the &lt;span style="font-weight: bold;"&gt;Compact Framework &lt;/span&gt;is a &lt;span style="font-style: italic;"&gt;subset &lt;/span&gt;of the &lt;span style="font-weight: bold;"&gt;.NET Framework&lt;/span&gt;, let's look at the bigger &lt;span style="font-weight: bold;"&gt;.NET Framework &lt;/span&gt;first.
&lt;br/&gt;&lt;br/&gt;
Think of the &lt;span style="font-weight: bold;"&gt;.NET Framework &lt;/span&gt;as the Microsoft equivalent of the Java Software Development Kit. Just &lt;span style="font-weight: bold;"&gt;like Java&lt;/span&gt;, the .NET Framework provides the developer &lt;span style="font-weight: bold;"&gt;a set of APIs &lt;/span&gt;with which he/she writes code that are executed in a "virtual machine". In .NET lingo, such code is called &lt;span style="font-weight: bold;"&gt;managed code&lt;/span&gt;, and the "virtual machine" is known as &lt;span style="font-weight: bold;"&gt;Common Language Runtime&lt;/span&gt; (CLR). In short, the CLR &lt;span style="font-weight: bold;"&gt;manages the execution of the code&lt;/span&gt;, and does all the resource management, code access security, threading, type safety, and all necessary plumbing, so that you as the programmer can &lt;span style="font-weight: bold;"&gt;churn out code more productively, focusing on the all-important business logic&lt;/span&gt;, and without having to worry too much about the nitty gritty.
&lt;br/&gt;&lt;br/&gt;
As for the Compact Framework, it does to Windows CE devices what its grand uncle .NET Framework does to desktops and servers. Think of it as a platform for developing &lt;span style="font-weight: bold;"&gt;managed code &lt;/span&gt;to be run on &lt;span style="font-weight: bold;"&gt;mobile devices&lt;/span&gt;.
&lt;br/&gt;&lt;br/&gt;
The Compact Framework is currently in &lt;span style="font-weight: bold;"&gt;version 2.0&lt;/span&gt;. &lt;a href="http://netcf2.blogspot.com/2005/11/getting-started-new-features-in-net.html"&gt;Here's a list&lt;/a&gt; of what are the new features version 2.0 offers.
&lt;br/&gt;&lt;br/&gt;
&lt;span style="font-size:85%;"&gt;Categories: [&lt;a href="http://search.blogger.com/?ie=UTF-8&amp;ui=blg&amp;amp;bl_url=netcf2.blogspot.com&amp;x=0&amp;amp;y=0&amp;scoring=d&amp;amp;as_q=getting%20started_"&gt;Getting started_&lt;/a&gt;]
Tags: [&lt;a href="http://www.technorati.com/tags/netcf2" rel="tag"&gt;netcf2&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/compact+framework" rel="tag"&gt;Compact Framework&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/windows+mobile" rel="tag"&gt;Windows Mobile&lt;/a&gt;]&lt;/span&gt;&lt;/span&gt;</content><link rel='alternate' type='text/html' href='http://netcf2.blogspot.com/2005/11/getting-started-what-is-net-compact.html' title='Getting started_: what is the .NET Compact Framework'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19142344&amp;postID=113291406021298259&amp;isPopup=true' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/113291406021298259/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/posts/default/113291406021298259'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19142344/posts/default/113291406021298259'/><author><name>danchong</name><uri>http://www.blogger.com/profile/12935398754747138118</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-19142344.post-113281247596490708</id><published>2005-11-24T13:27:00.000+08:00</published><updated>2006-04-04T02:07:16.746+08:00</updated><title type='text'>Blogging_: categories categories categories in Blogger blogs</title><content type='html'>&lt;span style="font-style: italic; font-weight: bold;"&gt;You can have &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;categories &lt;/span&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;in your blog in 5 minutes flat! &lt;/span&gt;
&lt;br/&gt;
&lt;hr style="color: rgb(153, 153, 153); background-color: rgb(153, 153, 153);" align="left" noshade="noshade" width="340"&gt;
&lt;table padding="0" spacing="0" border="0" width="360"&gt;
&lt;tbody&gt;&lt;tr  valign="bottom" style="font-size:8pt;"&gt;&lt;td&gt;
&lt;span style="color:red;"&gt;&lt;b&gt;Looking to include categories&lt;/b&gt;&lt;/span&gt;
in your Blogger blog? Check out these blogs that use my &lt;b&gt;netcf2&lt;/b&gt; hack:
&lt;br/&gt;
...
&lt;br/&gt;
&lt;a href="http://thejebber.blogspot.com/" style="border-bottom: 0px none; text-decoration: underline;" target="_blank"&gt;Pop Culture Jeblog&lt;/a&gt;
&lt;br/&gt;
&lt;span style="line-height: 8pt; color: rgb(17, 17, 17);font-size:7;" &gt;an entertainment blog&lt;br/&gt;
reviews on &lt;b&gt;music&lt;/b&gt;, DVDs, books...&lt;/span&gt;

&lt;!--&lt;a href="http://forestlaw.blogspot.com/" style="text-decoration:underline;border-bottom:0px" target="_blank"&gt;Forest Law&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;&lt;span style="line-height:8pt;font-size:7.5pt;color:#222;"&gt;an &lt;b&gt;environment&lt;/b&gt; activist blog&lt;/span&gt;&lt;br/&gt;&lt;br /&gt;--&gt;
&lt;!-- *** &lt;a href="http://thejebber.blogspot.com/" style="text-decoration:underline;border-bottom:0px" target="_blank"&gt;Pop Culture Jeblog&lt;/a&gt;,&lt;br /&gt;&lt;a href="http://forestlaw.blogspot.com/" style="text-decoration:underline;border-bottom:0px" target="_blank"&gt;Forest Law&lt;/a&gt; and even a&lt;br /&gt;&lt;a href="http://biosingularity.blogspot.com/" style="text-decoration:underline;border-bottom:0px" target="_blank"&gt;blog&lt;/a&gt; by a microbiology professor!&lt;br /&gt;*** --&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;!-- ******************************** &lt;br/&gt;&lt;br /&gt;&lt;span style="line-height:8pt;font-size:7.5pt;color:#333;"&gt;&lt;b&gt;Click&lt;/b&gt; to jump to my blog post with &lt;b&gt;step-by-step&lt;/b&gt; instructions&lt;/span&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr valign="bottom" style="font-size:8pt"&gt;&lt;td width="50%"&gt;&lt;br /&gt;Looking to include categories in your Blogger blog? Check out some of the sites&lt;a href="http://netcf2.blogspot.com/2005/11/blogging-categories-categories.html" style="text-decoration:underline;border-bottom:0px"&gt;Categories for Blogger blogs&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;&lt;span style="line-height:8pt;font-size:7.5pt;color:#333;"&gt;&lt;b&gt;Click&lt;/b&gt; to jump to my blog post with &lt;b&gt;step-by-step&lt;/b&gt; instructions&lt;/span&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a href="http://netcf2.blogspot.com/2005/11/getting-started-what-is-net-compact.html" style="text-decoration:underline;border-bottom:0px"&gt;Intro to Compact Framework&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;&lt;span style="line-height:8pt;font-size:7.5pt;color:#333;"&gt;&lt;b&gt;Click&lt;/b&gt; to read my tutorials to &lt;b&gt;kick start&lt;/b&gt; your development&lt;/span&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/table&gt; &lt;br /&gt;**************************** --&gt;
&lt;hr style="color: rgb(102, 102, 102); background-color: rgb(102, 102, 102);" align="left" noshade="noshade" width="220"&gt;&lt;span class="fullpost"&gt;
&lt;span style="font-weight: bold;"&gt;
&lt;span style="font-size:85%;"&gt;

&lt;a href="http://blogfresh.blogspot.com/2006/01/google-blogsearch-for-categories-hack.html" target="_blank"&gt;Freshblog (mentions)&lt;/a&gt;,
&lt;a href="http://absurdiav.blogspot.com/2006/02/categories.html" target="_blank"&gt;Ubi Dubium Ibi Libertas (mentions)&lt;/a&gt;,
&lt;a href="http://rabfish.blogspot.com/" target="_blank"&gt;Brown Rab Girl Fish&lt;/a&gt;,
&lt;a href="http://not-little-england.blogspot.com/2005/12/xblogthis-blogger-categories.html" target="_blank"&gt;Great Britain, not little England (mentions)&lt;/a&gt;,
&lt;a href="http://7cmarketing.supremeserver20.com/blog/2006/02/categories-in-blogger-blogs.html" target="_blank"&gt;7CM Internet Marketing Blog (mentions)&lt;/a&gt;,
&lt;a href="http://gavincorder.blogspot.com/" target="_blank"&gt;Gavin Corder's Blog&lt;/a&gt;,
&lt;a href="http://pikemotsamtiden.blogspot.com/" target="_blank"&gt;Pike Mot Samtiden&lt;/a&gt;,
&lt;a href="http://thisisnotmycountry.blogspot.com/" target="_blank"&gt;This is not my country&lt;/a&gt;,
&lt;a href="http://nevertobenext.blogspot.com/2006/01/hackeando-en-blogger-que-es-gerundio.html" target="_blank"&gt;Tempus Fugit (mentions)&lt;/a&gt;,
&lt;a href="http://capitaldefenseweekly.com/" target="_blank"&gt;Capital Defense Weekly&lt;/a&gt;,
&lt;a href="http://btrayner.blogspot.com/2005/12/categories-and-tagging.html" target="_blank"&gt;Em duas línguas (mentions)&lt;/a&gt;,
&lt;a href="http://gracamorais.blogspot.com/" target="_blank"&gt;Graça Morais&lt;/a&gt;,
&lt;a href="http://benedictus74.blogspot.com/" target="_blank"&gt;par Lui, avec Lui et en Lui  &lt;/a&gt;,
&lt;a href="http://formyselfandstrangers.blogspot.com/" target="_blank"&gt;For Myself and Strangers  &lt;/a&gt;,
&lt;a href="http://boyarul.blogspot.com/" target="_blank"&gt;idei de imprumut  &lt;/a&gt;,
&lt;a href="http://arareview.blogspot.com/" target="_blank"&gt;A Rare View&lt;/a&gt;,
&lt;a href="http://okazu.blogspot.com/" target="_blank"&gt;Okazu&lt;/a&gt;,
&lt;a href="http://lisaschamess.com/thetruthhurts.html" target="_blank"&gt;the truth hurts&lt;/a&gt;,
&lt;a href="http://novicegardens.blogspot.com/" target="_blank"&gt;Amateur Gardening&lt;/a&gt;,
&lt;a href="http://forestlaw.blogspot.com/" target="_blank"&gt;Forest Law&lt;/a&gt;,
&lt;a href="http://mckibihon.blogspot.com/" target="_blank"&gt;mckib•in•nihon&lt;/a&gt;,
&lt;a href="http://owsblog.blogspot.com/" target="_blank"&gt;owsblog&lt;/a&gt;

and many more - see &lt;a href="http://www.technorati.com/search/netcf2.blogspot.com" target=_blank&gt;my technorati ranking&lt;/a&gt; and &lt;a href="http://www.google.com/search?q=%22generated+by+netcf2%22" target=_blank&gt;google search&lt;/a&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;em&gt;&lt;/em&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-size:85%;" &gt; &lt;/span&gt;
&lt;br/&gt;&lt;br/&gt;
Many bloggers have noticed that &lt;span style="font-style: italic;"&gt;categories&lt;/span&gt; are not supported in Blogger. If you've used them before, you'll know categories are a good thing to have. In fact, many other blogging sites and popular blogware such as WordPress actually allow bloggers to create/manage categories and classify all their posts under them.
&lt;br/&gt;&lt;br/&gt;
It is &lt;span style="font-weight: bold;"&gt;possible to have categories &lt;/span&gt;in your Blogger blog. A simple search (&lt;span style="font-style: italic;"&gt;in Google or Blogger&lt;/span&gt;) shows that there are hacks to do it (&lt;span style="font-style: italic;"&gt;see my &lt;/span&gt;&lt;a style="font-style: italic;" href="http://netcf2.blogspot.com/2005/11/blogging-enable-categories-in-your.html"&gt;previous post&lt;/a&gt;&lt;span style="font-style: italic;"&gt; on which are the more popular techniques&lt;/span&gt;). However, these hacks are a little complicated for some, especially if you only need a basic category function. And most of these hacks rely on external sites to do the tagging, such as Technorati and del.icio.us.
&lt;br/&gt;&lt;br/&gt;
&lt;script type="text/javascript"&gt;&lt;!--
ch_client = "firec";
ch_width = 468;
ch_height = 60;
ch_color_border = "#efffff";
ch_color_bg = "#efffff";
ch_color_title = "#0000FF";
ch_color_text = "#333333";
ch_non_contextual = 1;
ch_sid = "cat";
var ch_queries = new Array( "blog","blogging" );
var ch_selected=Math.floor((Math.random()*ch_queries.length));
ch_query = ch_queries[ch_selected];
//--&gt;&lt;/script&gt;
&lt;script  src="http://scripts.chitika.net/eminimalls/mm.js" type="text/javascript"&gt;
&lt;/script&gt;
&lt;br/&gt;&lt;br/&gt;
If all you need is a &lt;span style="font-weight: bold;"&gt;simple yet effective categorizing feature &lt;/span&gt;in your blog, here's how you can do it &lt;span style="font-weight: bold;"&gt;in 5 minutes flat&lt;/span&gt;. I even wrote a &lt;span style="font-weight: bold;"&gt;script generator&lt;/span&gt;, so you can easily generate the code to add to your sidebar template (&lt;span style="font-style: italic;"&gt;very much like adding new links or Adsense code&lt;/span&gt;). In the spirit of clarity, I rehash what I &lt;a href="http://netcf2.blogspot.com/2005/11/blogging-generate-categories-for-your.html"&gt;posted previously&lt;/a&gt; here:
&lt;ol&gt;   &lt;li&gt;Visit the &lt;span style="font-weight: bold;"&gt;script generator&lt;/span&gt; &lt;a href="http://www.mobibo.com/gencat.htm" target="_blank"&gt;here&lt;/a&gt;.
&lt;/li&gt;  &lt;li&gt;Enter your &lt;span style="font-weight: bold;"&gt;blog URL&lt;/span&gt; in the first textbox. Leave out the "http://", and very importantly, &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;leave out the "www."&lt;/span&gt; as well (&lt;span style="font-style: italic;"&gt;this is because www.yourblog.blogspot.com is actually an &lt;span style="font-weight: bold;"&gt;alias &lt;/span&gt;to the actual yourblog.blogspot.com&lt;/span&gt;)
&lt;/li&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/gencat1.0.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/gencat1.0.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;li&gt;Next, enter your first &lt;span style="font-weight: bold;"&gt;category &lt;/span&gt;in the next textbox.&lt;/li&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/gencat2.1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/gencat2.1.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;li&gt;To add one more category, click on the link "&lt;span style="font-style: italic;"&gt;click this to add one more category&lt;/span&gt;" and enter it in the textbox that appears. Repeat this step, if necessary, to add more categories.
&lt;/li&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/gencat3.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/gencat3.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;li&gt;Finally, click the link "&lt;span style="font-style: italic;"&gt;Generate code&lt;/span&gt;" to generate the code. Click on the code and press Ctrl-C to copy the code.
&lt;/li&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/gencat4.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/gencat4.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;li&gt;Go to your blog Template and look for the section called &lt;span style="font-style: italic;"&gt;sidebar&lt;/span&gt;. Then paste the copied code at the place where you want the categories to appear.&lt;/li&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/gencat5.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/gencat5.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;li&gt;Save your template and republish your blog.
&lt;/li&gt;&lt;li&gt;Note that this technique (&lt;span style="font-style: italic;"&gt;or hack&lt;/span&gt;) actually makes use of Blogger Search to categorize your posts. Thus it is important that you name the categories appropriately so that the search results return the correct posts. The category name should contain &lt;span style="font-weight: bold;"&gt;keywords &lt;/span&gt;that appear in your post. One extremely effective way, which I use, is to either (1) prefix every post's title with its category name, for example, "&lt;span style="font-weight: bold; font-style: italic;"&gt;Blogging: &lt;/span&gt;categories categories...", or (2) ensure that your post contains the category name somewhere.&lt;/li&gt;&lt;li&gt;(You may need to republish your entire blog sometimes, to let Blogger index your pages.) &lt;font color=red&gt;If you find that Blogger Search is not searching your blog, check that you have activated the "Site Feed" and "Notify Weblogs.com" features for your blog (under Settings), and that your template does not contain a meta tag to stop the &lt;i&gt;search bots&lt;/i&gt; from indexing your blog.&lt;/font&gt;
&lt;/li&gt;    &lt;li&gt;You are done! &lt;font color="red"&gt;&lt;b&gt;If you like my technique/hack, please support this blog by making a small donation via PayPal (click the icon at the top left of this page). Any amount is appreciated. Thank you.&lt;/b&gt;&lt;/font&gt;
&lt;/li&gt;      &lt;/ol&gt;
&lt;span style="font-size:85%;"&gt;Categories: [&lt;a href="http://search.blogger.com/?ie=UTF-8&amp;ui=blg&amp;amp;bl_url=netcf2.blogspot.com&amp;x=0&amp;amp;y=0&amp;scoring=d&amp;amp;as_q=blogging_"&gt;Blogging_&lt;/a&gt;]
Tags: [&lt;a href="http://www.technorati.com/tags/netcf2" rel="tag"&gt;netcf2&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/categories" rel="tag"&gt;Categories&lt;/a&gt;]&lt;/span&gt;&lt;/span&gt;</content><link rel='alternate' type='text/html' href='http://netcf2.blogspot.com/2005/11/blogging-categories-categories.html' title='Blogging_: categories categories categories in Blogger blogs'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19142344&amp;postID=113281247596490708&amp;isPopup=true' title='202 Comments'/><link rel='replies' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/113281247596490708/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/posts/default/113281247596490708'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19142344/posts/default/113281247596490708'/><author><name>danchong</name><uri>http://www.blogger.com/profile/12935398754747138118</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-19142344.post-113273256730831923</id><published>2005-11-23T15:56:00.000+08:00</published><updated>2005-12-18T03:52:16.763+08:00</updated><title type='text'>Blogging_: Blogger Search - Another Method - Freshblog</title><content type='html'>Happy to note that my &lt;span style="font-style: italic;"&gt;categories &lt;/span&gt;method has been mentioned at &lt;a href="http://blogfresh.blogspot.com/2005/11/blogger-search-another-method.html"&gt;FreshBlog&lt;/a&gt;.
&lt;blockquote&gt;You can initiate a blogger-search by hard-coding the links into your sidebar too (cosmos search stylee) and then inserting the relevant keywords into all your post titles. What with this being Freshblog, and all, the results (surprise, surprise) will stand in for categories.
...
Daniel has written a code-generator that will build the sidebar menu for you. Cool!&lt;/blockquote&gt;&lt;span class="fullpost"&gt;
Thanks to John for the compliments.
&lt;br/&gt;&lt;br/&gt;
See &lt;a href="http://netcf2.blogspot.com/2005/11/blogging-generate-categories-for-your.html"&gt;this post&lt;/a&gt; of mine on exactly how to have categories in your blog.
&lt;br/&gt;&lt;br/&gt;
&lt;span style="font-size:85%;"&gt;Categories: [&lt;a href="http://search.blogger.com/?ie=UTF-8&amp;ui=blg&amp;amp;bl_url=netcf2.blogspot.com&amp;x=0&amp;amp;y=0&amp;scoring=d&amp;amp;as_q=blogging_"&gt;Blogging_&lt;/a&gt;]
Tags: [&lt;a href="http://www.technorati.com/tags/netcf2" rel="tag"&gt;netcf2&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/categories" rel="tag"&gt;Categories&lt;/a&gt;]&lt;/span&gt;&lt;/span&gt;</content><link rel='alternate' type='text/html' href='http://netcf2.blogspot.com/2005/11/blogging-blogger-search-another-method.html' title='Blogging_: Blogger Search - Another Method - Freshblog'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19142344&amp;postID=113273256730831923&amp;isPopup=true' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/113273256730831923/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/posts/default/113273256730831923'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19142344/posts/default/113273256730831923'/><author><name>danchong</name><uri>http://www.blogger.com/profile/12935398754747138118</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-19142344.post-113272285619115520</id><published>2005-11-23T12:41:00.000+08:00</published><updated>2005-12-28T16:05:31.760+08:00</updated><title type='text'>PDAs_: best Windows Mobile 5.0 non-phone PDA</title><content type='html'>In my opinion, the &lt;span style="font-weight: bold;"&gt;Dell Axim X51v PDA &lt;/span&gt;wins hands down (&lt;span style="font-style: italic;"&gt;as of this writing&lt;/span&gt;) in the non-phone Windows Mobile 5.0 PDA category.

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/dell1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/dell1.jpg" alt="" border="0" /&gt;&lt;/a&gt;
First, it runs the all-powerful &lt;span style="font-weight: bold;"&gt;624MHz &lt;/span&gt;Intel PXA270 CPU and comes with &lt;span style="font-weight: bold;"&gt;256MB &lt;/span&gt;of ROM and 64MB of RAM. Now, don't let the low RAM mislead you. &lt;span class="fullpost"&gt;Starting with &lt;span style="font-weight: bold;"&gt;Windows Mobile 5.0&lt;/span&gt;, which X51v is running, all data are stored in the ROM. This means that your programs, documents and data files are &lt;span style="font-weight: bold;"&gt;all stored in permanent storage&lt;/span&gt; (&lt;span style="font-style: italic;"&gt;called "persistent memory"&lt;/span&gt;). Even with the battery dead, you will &lt;span style="font-weight: bold;"&gt;not lose a single byte of your precious data&lt;/span&gt;. As for the RAM, it is used purely for running applications (&lt;span style="font-style: italic;"&gt;e.g. for "allocating memory to objects"&lt;/span&gt;).
&lt;br/&gt;&lt;br/&gt;
&lt;div style="text-align:center"&gt;
&lt;script type="text/javascript"&gt;&lt;!--
ch_client = "firec";
ch_width = 300;
ch_height = 250;
ch_color_border = "#efffff";
ch_color_bg = "#efffff";
ch_color_title = "#0000FF";
ch_color_text = "#333333";
ch_non_contextual = 1;
ch_sid = "axim";
var ch_queries = new Array( "X51v" );
var ch_selected=Math.floor((Math.random()*ch_queries.length));
ch_query = ch_queries[ch_selected];
//--&gt;&lt;/script&gt;
&lt;script  src="http://scripts.chitika.net/eminimalls/mm.js" type="text/javascript"&gt;
&lt;/script&gt;
&lt;/div&gt;
Next is its 480x640 &lt;span style="font-weight: bold;"&gt;VGA display &lt;/span&gt;with 65,536 colors. Although VGA displays are not the mainstream yet, certain applications support it. And when they do, it looks GREAT. The 3.7-inch screen size is the same or larger than most other PDAs. Moreover, with an Intel 2700G &lt;span style="font-weight: bold;"&gt;graphics accelerator&lt;/span&gt; (&lt;span style="font-style: italic;"&gt;something not common&lt;/span&gt;), the display speed and refresh rate are hard to beat.
&lt;br/&gt;&lt;br/&gt;
Weighing &lt;span style="font-weight: bold;"&gt;a tad heavy &lt;/span&gt;at 6.2 ounce (176g), X51v comes with &lt;span style="font-weight: bold;"&gt;standard connectivity&lt;/span&gt; - 802.11b, BlueTooth and IrDA support - as well as &lt;span style="font-style: italic;"&gt;CompactFlash II&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;SDIO Now!&lt;/span&gt; slots for I/O. Pretty standard fare here, except for the additional but &lt;span style="font-weight: bold;"&gt;optional VGA-Out support&lt;/span&gt; (&lt;span style="font-style: italic;"&gt;good for presentations&lt;/span&gt;).
&lt;br/&gt;&lt;br/&gt;
For all the cool features it has, the Dell Axim X51v PDA is &lt;span style="font-weight: bold;"&gt;priced extremely competitively&lt;/span&gt;. Good work, Dell!
&lt;br/&gt;&lt;br/&gt;
&lt;span style="font-size:85%;"&gt;Categories: [&lt;a href="http://search.blogger.com/?ie=UTF-8&amp;ui=blg&amp;bl_url=netcf2.blogspot.com&amp;x=0&amp;y=0&amp;scoring=d&amp;as_q=PDAs_"&gt;PDAs_&lt;/a&gt;]
Tags: [&lt;a href="http://www.technorati.com/tags/netcf2" rel="tag"&gt;netcf2&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/windows+mobile" rel="tag"&gt;Windows Mobile&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/pocket+pc" rel="tag"&gt;Pocket PC&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/pda" rel="tag"&gt;PDA&lt;/a&gt;]&lt;/span&gt;&lt;/span&gt;</content><link rel='alternate' type='text/html' href='http://netcf2.blogspot.com/2005/11/pdas-best-windows-mobile-50-non-phone.html' title='PDAs_: best Windows Mobile 5.0 non-phone PDA'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19142344&amp;postID=113272285619115520&amp;isPopup=true' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/113272285619115520/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/posts/default/113272285619115520'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19142344/posts/default/113272285619115520'/><author><name>danchong</name><uri>http://www.blogger.com/profile/12935398754747138118</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-19142344.post-113269047384161926</id><published>2005-11-23T03:27:00.000+08:00</published><updated>2005-12-28T23:19:28.890+08:00</updated><title type='text'>Controls_: using the soft keys for a Sudoku solver app</title><content type='html'>Well, maybe the &lt;a href="http://netcf2.blogspot.com/2005/11/getting-started-your-first-app.html"&gt;first app&lt;/a&gt; and even &lt;a href="http://netcf2.blogspot.com/2005/11/controls-browser-in-your-app.html"&gt;the browser app&lt;/a&gt; are too easy. (If you're just getting started with Compact Framework or the tools, see &lt;a href="http://netcf2.blogspot.com/2005/11/getting-started-install-tools.html"&gt;this&lt;/a&gt;.) Let's see if things get better...
&lt;br/&gt;&lt;br/&gt;
One of the most important new features in Windows Mobile 5.0 is the &lt;span style="font-weight: bold;"&gt;Soft Keys&lt;/span&gt;. Instead of using a traditional menu (&lt;span style="font-style: italic;"&gt;which is still possible&lt;/span&gt;), most apps will now use just the &lt;span style="font-weight: bold;"&gt;left soft key &lt;/span&gt;and the &lt;span style="font-weight: bold;"&gt;right soft key &lt;/span&gt;at the bottom of the screen. &lt;span class="fullpost"&gt;Like in cell phones, the functions of the soft keys change according to the context (&lt;span style="font-style: italic;"&gt;i.e. it is "app-dependent", and "form-dependent"&lt;/span&gt;).
&lt;br/&gt;&lt;br/&gt;
&lt;script type="text/javascript"&gt;&lt;!--
ch_client = "firec";
ch_width = 468;
ch_height = 60;
ch_color_border = "#efffff";
ch_color_bg = "#efffff";
ch_color_title = "#0000FF";
ch_color_text = "#333333";
ch_non_contextual = 1;
ch_sid = "sudoku";
var ch_queries = new Array( "sudoku" );
var ch_selected=Math.floor((Math.random()*ch_queries.length));
ch_query = ch_queries[ch_selected];
//--&gt;&lt;/script&gt;
&lt;script  src="http://scripts.chitika.net/eminimalls/mm.js" type="text/javascript"&gt;
&lt;/script&gt;
&lt;br/&gt;&lt;br/&gt;
&lt;span style="font-weight: bold;"&gt;Sudoku puzzles &lt;/span&gt;are all the rage these days. According to &lt;a href="http://www.shef.ac.uk/~pm1afj/sudoku/sudgroup.html" target=_blank&gt;this&lt;/a&gt; there are 5,472,730,538 unique Sudoku puzzles, and &lt;a href="http://blogs.warwick.ac.uk/fangz/entry/unsolved_problems_in/" target=_blank&gt;this claims&lt;/a&gt; that Sudoku puzzles are NP-complete. These all mean you'll have endless fun with Sudoku. So today, to make it more fun, we're going to write a Sudoku solver app. It uses a brute force algorithm, so any solvable Sudoku puzzle can be solved using this app.
&lt;ol&gt;   &lt;li&gt;Create a new C# Windows Mobile 5.0 PPC Device Application project in Visual Studio .NET 2005.&lt;/li&gt;   &lt;li&gt;At the bottom of the form is a blue bar. That is the menu. To add the left soft key, click on the left side of the blue bar and type "Default". Similarly for the right soft key, click on the right side and type "Solve It!"&lt;/li&gt;   &lt;li&gt;Add a TextBox control to the form. Change its &lt;span style="font-weight: bold;"&gt;Multiline &lt;/span&gt;property to &lt;span style="font-weight: bold;"&gt;True&lt;/span&gt;. When the app runs, the user will enter the puzzle in the textbox. Dock the textbox so that it always fills the entire form, by changing its &lt;span style="font-weight: bold;"&gt;Dock &lt;/span&gt;property to &lt;span style="font-weight: bold;"&gt;Fill&lt;/span&gt; (&lt;span style="font-style: italic;"&gt;see also &lt;/span&gt;&lt;a style="font-style: italic;" href="http://netcf2.blogspot.com/2005/11/controls-browser-in-your-app.html"&gt;this&lt;/a&gt;&lt;span style="font-style: italic;"&gt; on docking and anchoring&lt;/span&gt;). Change its &lt;span style="font-weight: bold;"&gt;Font &lt;/span&gt;property to use &lt;span style="font-weight: bold;"&gt;Courier New Bold 12pt&lt;/span&gt;.
&lt;/li&gt;   &lt;li&gt;Change other properties (&lt;span style="font-style: italic;"&gt;see previous posts&lt;/span&gt;) as needed to get this:&lt;/li&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/sudoku1.0.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/sudoku1.0.jpg" alt="" border="0" /&gt;&lt;/a&gt;
&lt;li&gt;Double-click on "Default" to jump to the event handler of the left soft key. We want to set the textbox to contain a default puzzle when the user clicks on this soft key. Type the following code in the event handler method:&lt;/li&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;textBox1.Text=&lt;/span&gt;&lt;br/&gt;      &lt;span style="font-family:verdana;"&gt;@"800017060&lt;/span&gt;&lt;br/&gt;
&lt;span style="font-family:verdana;"&gt;407065000&lt;/span&gt;&lt;br/&gt;
&lt;span style="font-family:verdana;"&gt;905080310&lt;/span&gt;&lt;br/&gt;
&lt;span style="font-family:verdana;"&gt;300200001&lt;/span&gt;&lt;br/&gt;
&lt;span style="font-family:verdana;"&gt;070000040&lt;/span&gt;&lt;br/&gt;
&lt;span style="font-family:verdana;"&gt;500004008&lt;/span&gt;&lt;br/&gt;
&lt;span style="font-family:verdana;"&gt;086070504&lt;/span&gt;&lt;br/&gt;
&lt;span style="font-family:verdana;"&gt;000540206&lt;/span&gt;&lt;br/&gt;
&lt;span style="font-family:verdana;"&gt;050620009";&lt;/span&gt;&lt;/span&gt;
&lt;/blockquote&gt;&lt;li&gt;Next, the logic of the solver. Press Shift-F7 to go back to design view and double-click on the "Solve It!" right soft key. Type the following in the event handler:&lt;/li&gt;&lt;blockquote  style="font-family:verdana;"&gt;&lt;span nowrap=""  style="font-size:85%;"&gt;if (textBox1.Text.Trim() == "") return;&lt;br/&gt;
string s = textBox1.Text.Replace(" ", "").Replace("\t", "");&lt;br/&gt;
char[] tA = s.Replace("\r", "").Replace("\n", "").ToCharArray();&lt;br/&gt;
textBox1.Text = "";&lt;br/&gt;
int[] A = new int[tA.Length];&lt;br/&gt;
for (int i = 0; i &amp;lt; tA.Length; i++) A[i] = (int)(tA[i] - '0');&lt;br/&gt;
R(A);&lt;/span&gt;&lt;/blockquote&gt;&lt;li&gt;Copy the following 2 methods and paste into your code (&lt;span style="font-style: italic;"&gt;below the previous event handler method&lt;/span&gt;):&lt;/li&gt;&lt;blockquote  style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;
private void R(int[] A)&lt;br/&gt;
{&lt;br/&gt;
&amp;nbsp;&amp;nbsp;for (int i = 0; i &amp;lt;= 80; i++)&lt;br/&gt;
&amp;nbsp;&amp;nbsp;{&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (A[i] &amp;gt; 0) continue;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ArrayList aL = new ArrayList(new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 });&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for (int j = 0; j &amp;lt;= 80; j++)&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (j / 9 == i / 9 || j % 9 == i % 9 ||&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(j / 27 == i / 27 &amp;&amp; (j % 9) / 3 == (i % 9) / 3))&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;aL.Remove(A[j]);&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foreach (int k in aL) { A[i] = k; R(A); }&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;A[i] = 0; return;&lt;br/&gt;
&amp;nbsp;&amp;nbsp;}&lt;br/&gt;
&amp;nbsp;&amp;nbsp;print(A);&lt;br/&gt;
}&lt;br/&gt;
private void print(int[] A)&lt;br/&gt;
{&lt;br/&gt;
&amp;nbsp;&amp;nbsp;string s = "";&lt;br/&gt;
&amp;nbsp;&amp;nbsp;for (int i = 0; i &amp;lt;= 80; i++)&lt;br/&gt;
&amp;nbsp;&amp;nbsp;{&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;s += A[i] + " ";&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (i % 3 == 2) s += " ";&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (i % 9 == 8) s += "\r\n";&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (i % 27 == 26) s += "\r\n";&lt;br/&gt;
&amp;nbsp;&amp;nbsp;}&lt;br/&gt;
&amp;nbsp;&amp;nbsp;textBox1.Text = s;&lt;br/&gt;
}
&lt;/span&gt;&lt;/blockquote&gt;&lt;li&gt;Because ArrayList is used in the code, add a line right at the top of your code to include the &lt;span style="font-weight: bold;"&gt;Collections &lt;/span&gt;namespace:&lt;/li&gt;&lt;blockquote  style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;using System.Collections;&lt;/span&gt;&lt;/blockquote&gt;&lt;li&gt;To tabify/beautify your code, click Edit-&gt; Advanced-&gt; Format Document in your code view.
&lt;/li&gt;&lt;li&gt;Finally, click Ctrl-F5 to deploy and run. To test, click on &lt;span style="font-weight: bold;"&gt;Default &lt;/span&gt;and click &lt;span style="font-weight: bold;"&gt;Solve It! &lt;/span&gt;You may also type in your own Sudoku puzzle (&lt;span style="font-style: italic;"&gt;enter all the numbers in 9 rows, with a zero for each "space" to solve, as illustrated in the default puzzle&lt;/span&gt;).
&lt;/li&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/sudoku2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/sudoku2.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;/ol&gt;
Ever wondered what really is the Microsoft .NET Compact Framework? Read &lt;a href="http://netcf2.blogspot.com/2005/11/getting-started-what-is-net-compact.html"&gt;this&lt;/a&gt;.
&lt;br/&gt;&lt;br/&gt;
Or write a &lt;a href="http://netcf2.blogspot.com/2005/11/multithreaded-prime-number-generator.html"&gt;Multithreaded Prime Number Generator&lt;/a&gt; for your PDA!&lt;br/&gt;&lt;br/&gt;
&lt;span style="font-size:85%;"&gt;Categories: [&lt;a href="http://search.blogger.com/?ie=UTF-8&amp;ui=blg&amp;bl_url=netcf2.blogspot.com&amp;x=0&amp;y=0&amp;scoring=d&amp;as_q=controls_"&gt;Controls_&lt;/a&gt;]
Tags: [&lt;a href="http://www.technorati.com/tags/netcf2" rel="tag"&gt;netcf2&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/compact+framework" rel="tag"&gt;Compact Framework&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/windows+mobile" rel="tag"&gt;Windows Mobile&lt;/a&gt;]&lt;/span&gt;&lt;/span&gt;</content><link rel='alternate' type='text/html' href='http://netcf2.blogspot.com/2005/11/controls-using-soft-keys-for-sudoku.html' title='Controls_: using the soft keys for a Sudoku solver app'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19142344&amp;postID=113269047384161926&amp;isPopup=true' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/113269047384161926/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/posts/default/113269047384161926'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19142344/posts/default/113269047384161926'/><author><name>danchong</name><uri>http://www.blogger.com/profile/12935398754747138118</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-19142344.post-113267514929232304</id><published>2005-11-22T23:57:00.000+08:00</published><updated>2006-04-04T02:11:23.093+08:00</updated><title type='text'>Blogging_: generate categories for your blog</title><content type='html'>Updated Nov 24: see my &lt;a href="http://netcf2.blogspot.com/2005/11/blogging-categories-categories.html"&gt;latest post&lt;/a&gt; with step-by-step instructions on creating categories.
&lt;br/&gt;&lt;br/&gt;
Following my &lt;a href="http://netcf2.blogspot.com/2005/11/blogging-enable-categories-in-your.html"&gt;previous post&lt;/a&gt; on how to create &lt;span style="font-weight: bold;"&gt;categories &lt;/span&gt;in Blogger easily (see also FreshBlog's posts on other methods &lt;a href="http://blogfresh.blogspot.com/2005/06/3-ways-to-use-delicious-for-categories.html"&gt;here&lt;/a&gt; and &lt;a href="http://blogfresh.blogspot.com/2005/08/tagging-with-blogthis.html"&gt;here&lt;/a&gt;) , I wrote some &lt;span style="font-weight: bold;"&gt;JavaScript code&lt;/span&gt; to &lt;span style="font-weight: bold;"&gt;generate code &lt;/span&gt;for anyone who's interested to add &lt;span style="font-weight: bold;"&gt;categories &lt;/span&gt;to his/her &lt;span style="font-weight: bold;"&gt;sidebar template&lt;/span&gt;. Here's how to use it:&lt;span class="fullpost"&gt;
&lt;ol&gt;   &lt;li&gt;First, decide what are the &lt;span style="font-weight: bold;"&gt;category names &lt;/span&gt;you want. These names must be searchable by the Blogger search engine. My way to ensure this is to "tag" every of my posts by prefixing the category name in its title. For example, this particular post has "Blogging" as the title prefix.
&lt;/li&gt;&lt;li&gt;Next, visit &lt;a href="http://www.mobibo.com/gencat.htm"&gt;this page&lt;/a&gt; at my other site (&lt;span style="font-style: italic;"&gt;Blogger doesn't allow me to embed the JavaScript in a post, so I have to upload my script generator elsewhere&lt;/span&gt;).&lt;/li&gt;   &lt;li&gt;In the first textbox, enter the &lt;span style="font-weight: bold;"&gt;URL of your blog&lt;/span&gt;. For my case (&lt;span style="font-style: italic;"&gt;as an example&lt;/span&gt;), it will be netcf2.blogspot.com&lt;/li&gt;   
&lt;br/&gt;&lt;br/&gt;
&lt;script type="text/javascript"&gt;&lt;!--
ch_client = "firec";
ch_width = 468;
ch_height = 60;
ch_color_border = "#efffff";
ch_color_bg = "#efffff";
ch_color_title = "#0000FF";
ch_color_text = "#333333";
ch_non_contextual = 1;
ch_sid = "cat";
var ch_queries = new Array( "nano","xbox 360","psp" );
var ch_selected=Math.floor((Math.random()*ch_queries.length));
ch_query = ch_queries[ch_selected];
//--&gt;&lt;/script&gt;
&lt;script  src="http://scripts.chitika.net/eminimalls/mm.js" type="text/javascript"&gt;
&lt;/script&gt;
&lt;br/&gt;&lt;br/&gt;
&lt;li&gt;There's a link beside the word &lt;span style="font-weight: bold;"&gt;Categories&lt;/span&gt;. Click on it to add more textboxes (&lt;span style="font-style: italic;"&gt;as many as the number of categories you intend to have&lt;/span&gt;). Then type in the category names in the textboxes.&lt;/li&gt;   &lt;li&gt;Finally, click &lt;span style="font-weight: bold;"&gt;Generate code&lt;/span&gt;. And &lt;span style="font-weight: bold;"&gt;copy the generated code to your Blogger template &lt;/span&gt;code (&lt;span style="font-style: italic;"&gt;place it in the sidebar&lt;/span&gt;). This is similar to adding Google Adsense code.&lt;/li&gt;  &lt;/ol&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/getcat.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/getcat.jpg" alt="" border="0" /&gt;&lt;/a&gt;
&lt;br/&gt;&lt;br/&gt;
&lt;span style="font-size:85%;"&gt;Categories: [&lt;a href="http://search.blogger.com/?ie=UTF-8&amp;ui=blg&amp;amp;bl_url=netcf2.blogspot.com&amp;x=0&amp;amp;y=0&amp;scoring=d&amp;amp;as_q=blogging_"&gt;Blogging_&lt;/a&gt;]
Tags: [&lt;a href="http://www.technorati.com/tags/netcf2" rel="tag"&gt;netcf2&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/categories" rel="tag"&gt;Categories&lt;/a&gt;]&lt;/span&gt;&lt;/span&gt;</content><link rel='alternate' type='text/html' href='http://netcf2.blogspot.com/2005/11/blogging-generate-categories-for-your.html' title='Blogging_: generate categories for your blog'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19142344&amp;postID=113267514929232304&amp;isPopup=true' title='56 Comments'/><link rel='replies' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/113267514929232304/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/posts/default/113267514929232304'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19142344/posts/default/113267514929232304'/><author><name>danchong</name><uri>http://www.blogger.com/profile/12935398754747138118</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-19142344.post-113264935651455766</id><published>2005-11-22T16:28:00.000+08:00</published><updated>2005-12-18T03:55:09.906+08:00</updated><title type='text'>Getting started_: using the emulator</title><content type='html'>After &lt;a href="http://netcf2.blogspot.com/2005/11/getting-started-install-tools.html"&gt;installing the tools&lt;/a&gt; and &lt;a href="http://netcf2.blogspot.com/2005/11/getting-started-your-first-app.html"&gt;writing your first app&lt;/a&gt;, here are some tips on using the Windows Mobile emulators.&lt;span class="fullpost"&gt;
&lt;ol&gt;   &lt;li&gt;There are 2 ways (&lt;span style="font-style: italic;"&gt;at least&lt;/span&gt;) to start an emulator. One is to create a new Windows Mobile device application, write a simple program, and &lt;span style="font-weight: bold;"&gt;deploy to an emulator&lt;/span&gt;. The other way is to launch the &lt;span style="font-weight: bold;"&gt;Device Emulator Manager &lt;/span&gt;(&lt;span style="font-style: italic;"&gt;in Visual Studio .NET 2005, click Tools-&gt; Device Emulator Manager&lt;/span&gt;), right-click on one of the emulators in the list, and click Connect.&lt;/li&gt;   &lt;li&gt;My favourite emulator is &lt;span style="font-weight: bold;"&gt;Windows Mobile 5.0 Pocket PC Phone Emulator&lt;/span&gt;. It does what a normal Pocket PC can do, and more. We'll explore the phone features in another post.
&lt;/li&gt;   &lt;li&gt;You can "cradle" an emulator. This is akin to physically slotting an actual Pocket PC PDA into its cradle, except that you are doing it to a virtual PDA (&lt;span style="font-style: italic;"&gt;i.e. the emulator&lt;/span&gt;). To cradle a running emulator, right-click on the item &lt;span style="font-style: italic;"&gt;that corresponds to the emulator&lt;/span&gt; in the &lt;span style="font-weight: bold;"&gt;Device Emulator Manager&lt;/span&gt; &lt;span style="font-style: italic;"&gt;&lt;/span&gt;(&lt;span style="font-style: italic;"&gt;i.e. if you're running the Windows Mobile 5.0 PPC Phone Emulator, right-click on "Windows Mobile... Phone Emulator"&lt;/span&gt;), and click &lt;span style="font-weight: bold;"&gt;Cradle&lt;/span&gt;. The ActiveSync icon in your systray should start spinning, indicating that synchronization is in progress. If this is the first time you are cradling the emulator, a wizard will pop up. Just go through it as you would with any other wizards (&lt;span style="font-style: italic;"&gt;I'd uncheck all the checkboxes&lt;/span&gt;).&lt;/li&gt;   &lt;li&gt;Turning off the emulator is easy, just click the close button (&lt;span style="font-style: italic;"&gt;the cross at the top right&lt;/span&gt;). &lt;span style="font-weight: bold;"&gt;HOWEVER&lt;/span&gt;, &lt;span style="font-weight: bold;"&gt;always remember to &lt;span style="font-style: italic;"&gt;Uncradle &lt;/span&gt;the emulator first&lt;/span&gt;. When prompted to save state, click Yes. (If you forget, which I sometimes do, you'll find that ActiveSync is unable to detect the emulator. In this case, do a soft-reset by clicking File-&gt; Reset-&gt; Soft.)&lt;/li&gt; &lt;/ol&gt;Now, let's write &lt;a href="http://netcf2.blogspot.com/2005/11/controls-browser-in-your-app.html"&gt;your second app&lt;/a&gt;, which is a BROWSER!
&lt;br/&gt;&lt;br/&gt;
&lt;span style="font-size:85%;"&gt;Categories: [&lt;a href="http://search.blogger.com/?ie=UTF-8&amp;ui=blg&amp;bl_url=netcf2.blogspot.com&amp;x=0&amp;y=0&amp;scoring=d&amp;as_q=getting%20started_"&gt;Getting started_&lt;/a&gt;]
Tags: [&lt;a href="http://www.technorati.com/tags/netcf2" rel="tag"&gt;netcf2&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/compact+framework" rel="tag"&gt;Compact Framework&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/windows+mobile" rel="tag"&gt;Windows Mobile&lt;/a&gt;]&lt;/span&gt;&lt;/span&gt;</content><link rel='alternate' type='text/html' href='http://netcf2.blogspot.com/2005/11/getting-started-using-emulator.html' title='Getting started_: using the emulator'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19142344&amp;postID=113264935651455766&amp;isPopup=true' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/113264935651455766/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/posts/default/113264935651455766'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19142344/posts/default/113264935651455766'/><author><name>danchong</name><uri>http://www.blogger.com/profile/12935398754747138118</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-19142344.post-113264086988616384</id><published>2005-11-22T14:00:00.000+08:00</published><updated>2005-12-18T03:55:42.100+08:00</updated><title type='text'>Controls_: browser in your app</title><content type='html'>After &lt;a href="http://netcf2.blogspot.com/2005/11/getting-started-your-first-app.html"&gt;writing your first app&lt;/a&gt; using the Microsoft .NET Compact Framework 2.0 and deploying to a Windows Mobile 5.0 Pocket PC emulator (and &lt;a href="http://netcf2.blogspot.com/2005/11/getting-started-using-emulator.html"&gt;tips on using the Windows Mobile emulators&lt;/a&gt;), you are now ready to write your second app.
&lt;br/&gt;&lt;br/&gt;
One of the new conrols in netcf2 is the browser control. The example here shows you how to create a simple browser app for your Pocket PC.&lt;span class="fullpost"&gt;

&lt;ol&gt;   &lt;li&gt;First, start Visual Studio .NET 2005.
&lt;/li&gt;&lt;li&gt;If you're using an emulator, ensure that it is connected to the network. There are 2 methods to do this. Click Tools-&gt; &lt;span style="font-weight: bold;"&gt;Device Emulator Manager&lt;/span&gt; to start the &lt;span style="font-weight: bold;"&gt;Device Emulator Manager&lt;/span&gt;, right-click on &lt;span style="font-weight: bold;"&gt;Windows Mobile 5.0 Pocket PC Phone Emulator &lt;/span&gt;(&lt;span style="font-style: italic;"&gt;or another WM5 emulator&lt;/span&gt;) and click &lt;span style="font-weight: bold;"&gt;Connect&lt;/span&gt;. The emulator will start up. Now, in the Device Emulator Manager again, right-click on the same item and click &lt;span style="font-weight: bold;"&gt;Cradle&lt;/span&gt; (see pic). This will connect the emulated PDA to your PC via ActiveSync. If it is the first time you're doing this, just go through the wizard on what to synchronize (&lt;span style="font-style: italic;"&gt;I'd uncheck everything&lt;/span&gt;). Your emulator should now be connected to the network via your PC. The &lt;span style="font-style: italic; font-weight: bold;"&gt;second &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;method &lt;/span&gt;is to bind the network adaptor in the emulator to the networking in your PC. In the emulator program, click File-&gt; Configure, under the Network tab, check the first checkbox to enable the network adapter.&lt;/li&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/browser1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px;" src="http://photos1.blogger.com/blogger/2609/601/1600/browser1.jpg" alt="" border="0" /&gt;&lt;/a&gt;
&lt;li&gt;Do a quick check by opening Internet Explorer in the emulator and browsing to a website such as www.google.com (&lt;span style="font-style: italic;"&gt;yes, there's already a browser, so why are we writing another browser?!&lt;/span&gt;)&lt;/li&gt;   &lt;li&gt;Next, as in previous examples, create a &lt;span style="font-weight: bold;"&gt;Windows Mobile 5.0 Device Application &lt;/span&gt;project. As usual, change the &lt;span style="font-weight: bold;"&gt;Minimize Box &lt;/span&gt;property of the form to False.&lt;/li&gt;&lt;li&gt;From the toolbox, drag the &lt;span style="font-weight: bold;"&gt;WebBrowser &lt;/span&gt;control to the form. By default, the WebBrowser control is &lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;docked&lt;/span&gt; &lt;/span&gt;to the form. This means that it fills up the entire form all the time, regardless of the form's orientation (&lt;span style="font-style: italic;"&gt;portrait or landscape&lt;/span&gt;). This is a nice behavior, but we'll &lt;span style="font-style: italic; font-weight: bold;"&gt;anchor &lt;/span&gt;the control instead. To do this, we first undock the control: with the control selected, you should see a little triangle. Click on it to open a "&lt;span style="font-weight: bold;"&gt;Smart Task menu&lt;/span&gt;", and select &lt;span style="font-weight: bold;"&gt;Undock in parent container&lt;/span&gt;.
&lt;/li&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/browser2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/browser2.jpg" alt="" border="0" /&gt;&lt;/a&gt;
&lt;li&gt;Still with the WebBrowser control selected, go to the Properties panel (&lt;span style="font-style: italic;"&gt;shortcut key: F4&lt;/span&gt;) and change its &lt;span style="font-weight: bold;"&gt;Anchor &lt;/span&gt;property such that the control is anchored &lt;span style="font-weight: bold;"&gt;Bottom, Left, Right &lt;/span&gt;to the form (&lt;span style="font-style: italic;"&gt;see pic below&lt;/span&gt;). With anchoring, the control will always maintain the same distance from the sides of the form to which it is anchored (&lt;span style="font-style: italic;"&gt;bottom, left &amp; right in our case here&lt;/span&gt;).
&lt;/li&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/browser3.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/browser3.jpg" alt="" border="0" /&gt;&lt;/a&gt;
&lt;li&gt;Drag and resize the WebBrowser control such that it fills about two-thirds of the form, leaving a gap at the top. Right-click on the form (&lt;span style="font-style: italic;"&gt;or on the little lock symbol&lt;/span&gt;) and select &lt;span style="font-weight: bold;"&gt;Rotate Right&lt;/span&gt;. You now see the &lt;span style="font-weight: bold;"&gt;landscape mode at design time&lt;/span&gt;! Notice that the WebBrowser control still maintains the same distance from bottom, left &amp; right (&lt;span style="font-style: italic;"&gt;if it fills up the form, you should decrease the height of the control&lt;/span&gt;). &lt;span style="font-weight: bold;"&gt;Rotate Left &lt;/span&gt;the form to revert to portrait mode.&lt;/li&gt;&lt;li&gt;Drag a TextBox control and a Button control to the form. Change the Text property of each to have this:&lt;/li&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/browser4.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/browser4.jpg" alt="" border="0" /&gt;&lt;/a&gt;
&lt;li&gt;Finally, double-click on the &lt;span style="font-weight: bold;"&gt;Go!&lt;/span&gt; button and add this line of code to its &lt;span style="font-style: italic;"&gt;click &lt;/span&gt;event handler:&lt;/li&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;Uri u = new Uri(textBox1.Text);&lt;/span&gt;
&lt;span style="font-family:verdana;"&gt;webBrowser1.Navigate(u);&lt;/span&gt;&lt;/span&gt;
&lt;/blockquote&gt;&lt;li&gt;Click Ctrl-F5 to run. Enter a valid URL and click Go!. To see the &lt;span style="font-weight: bold;"&gt;anchoring in action&lt;/span&gt;, click on the calendar button in the emulator (&lt;span style="font-style: italic;"&gt;circled in red in pic below&lt;/span&gt;) to change to landscape orientation.&lt;/li&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/browser5.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/browser5.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;/ol&gt;
Where do we go from here? Let's write something more complicated, like a &lt;a href="http://netcf2.blogspot.com/2005/11/controls-using-soft-keys-for-sudoku.html"&gt;Sudoku solver&lt;/a&gt;! And maybe check out the &lt;a href="http://netcf2.blogspot.com/2005/11/pdas-best-windows-mobile-50-non-phone.html"&gt;Dell Axim X51v&lt;/a&gt;.
&lt;br/&gt;&lt;br/&gt;
&lt;span style="font-size:85%;"&gt;Categories: [&lt;a href="http://search.blogger.com/?ie=UTF-8&amp;ui=blg&amp;bl_url=netcf2.blogspot.com&amp;x=0&amp;y=0&amp;scoring=d&amp;as_q=controls_"&gt;Controls_&lt;/a&gt;]
Tags: [&lt;a href="http://www.technorati.com/tags/netcf2" rel="tag"&gt;netcf2&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/compact+framework" rel="tag"&gt;Compact Framework&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/windows+mobile" rel="tag"&gt;Windows Mobile&lt;/a&gt;]&lt;/span&gt;&lt;/span&gt;</content><link rel='alternate' type='text/html' href='http://netcf2.blogspot.com/2005/11/controls-browser-in-your-app.html' title='Controls_: browser in your app'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19142344&amp;postID=113264086988616384&amp;isPopup=true' title='4 Comments'/><link rel='replies' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/113264086988616384/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/posts/default/113264086988616384'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19142344/posts/default/113264086988616384'/><author><name>danchong</name><uri>http://www.blogger.com/profile/12935398754747138118</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-19142344.post-113259496784046042</id><published>2005-11-22T01:31:00.000+08:00</published><updated>2005-12-28T21:38:34.916+08:00</updated><title type='text'>Blogging_: enable categories in your blog</title><content type='html'>Updated Nov 24: see my &lt;a href="http://netcf2.blogspot.com/2005/11/blogging-categories-categories.html"&gt;latest post&lt;/a&gt; with step-by-step instructions on creating categories.
&lt;br/&gt;&lt;br/&gt;
Like many others, I was surprised that Blogger does not support categories. Did a search and found many cool hacks on tagging and creating pseudo categories, such as &lt;a href="http://blog.zoundry.com/2005/09/custom-tags-my-delicious-blogger.html" target="_blank"&gt;Zoundry's custom tags&lt;/a&gt;, &lt;a href="http://blogfresh.blogspot.com/2005/04/how-to-use-delicious-for-blogger.html" target="_blank"&gt;FreshBlog's 3 methods&lt;/a&gt; and &lt;a href="http://billyjoejimbob-advice.blogspot.com/2004/12/topics-using-blogger_07.html" target="_blank"&gt;Billy Joe Jim Bob's multi-blog method&lt;/a&gt;. Still, I thought things could be simpler. This is my method:&lt;span class="fullpost"&gt;
&lt;ul&gt;&lt;li&gt;Tag every post with a category by prefixing its title with the category name, e.g. "Blogging: ...", "Getting started: ..."&lt;/li&gt;
&lt;li&gt;Modify the template code to include a Categories section. Here's an example based on what I have (as you can see in my sidebar, I have a few categories currently; for clarity, this example shows just one category):
&lt;/li&gt;&lt;/ul&gt;&lt;blockquote  style="font-family:verdana;"&gt;&lt;span style="font-size:100%;"&gt;&lt;pre&gt;&amp;lt;h2 class="sidebar-title"&amp;gt;Categories&amp;lt;/h2&amp;gt;
&amp;lt;ul&amp;gt;
&amp;lt;li&amp;gt;&amp;lt;a href="http://search.blogger.com/?ie=UTF-8
&amp;ui=blg&amp;amp;bl_url=&lt;span style="font-weight: bold;"&gt;netcf2.blogspot.com&lt;/span&gt;&amp;x=0&amp;amp;y=0&amp;scoring=d&amp;amp;
as_q=&lt;span style="font-weight: bold;"&gt;getting%20started&lt;/span&gt;"&amp;gt;&lt;span style="font-weight: bold;"&gt;Getting started&lt;/span&gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;/ul&amp;gt;
&lt;/pre&gt;&lt;/span&gt;&lt;/blockquote&gt;(&lt;span style="font-style: italic;"&gt;Note: the whole &amp;lt;li&amp;gt;...&amp;lt;/li&amp;gt; should be on one line, and you should replace &lt;span style="font-weight: bold;"&gt;netcf2.blogspot.com &lt;/span&gt;with your blog url, as well as the value for the &lt;span style="font-weight: bold;"&gt;as_q &lt;/span&gt;parameter.&lt;/span&gt;)
&lt;br/&gt;&lt;br/&gt;
&lt;script type="text/javascript"&gt;&lt;!--
ch_client = "firec";
ch_width = 468;
ch_height = 60;
ch_color_border = "#efffff";
ch_color_bg = "#efffff";
ch_color_title = "#0000FF";
ch_color_text = "#333333";
ch_non_contextual = 1;
ch_sid = "cat";
var ch_queries = new Array( "nano","xbox 360","psp" );
var ch_selected=Math.floor((Math.random()*ch_queries.length));
ch_query = ch_queries[ch_selected];
//--&gt;&lt;/script&gt;
&lt;script  src="http://scripts.chitika.net/eminimalls/mm.js" type="text/javascript"&gt;
&lt;/script&gt;
&lt;br/&gt;&lt;br/&gt;
When a user clicks on a category link, a blogger search is invoked, searching for posts that contain the category name within this blog. As you may have guessed, the prefixes in the titles make searching more effective. For even better search results, you can have more unique category names (&lt;em&gt;than mine&lt;/em&gt;).
&lt;br/&gt;&lt;br/&gt;
&lt;span style="font-size:85%;"&gt;Categories: [&lt;a href="http://search.blogger.com/?ie=UTF-8&amp;ui=blg&amp;amp;bl_url=netcf2.blogspot.com&amp;x=0&amp;amp;y=0&amp;scoring=d&amp;amp;as_q=blogging_"&gt;Blogging_&lt;/a&gt;]
Tags: [&lt;a href="http://www.technorati.com/tags/netcf2" rel="tag"&gt;netcf2&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/categories" rel="tag"&gt;Categories&lt;/a&gt;]&lt;/span&gt;&lt;/span&gt;</content><link rel='alternate' type='text/html' href='http://netcf2.blogspot.com/2005/11/blogging-enable-categories-in-your.html' title='Blogging_: enable categories in your blog'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19142344&amp;postID=113259496784046042&amp;isPopup=true' title='5 Comments'/><link rel='replies' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/113259496784046042/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/posts/default/113259496784046042'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19142344/posts/default/113259496784046042'/><author><name>danchong</name><uri>http://www.blogger.com/profile/12935398754747138118</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-19142344.post-113255754248966013</id><published>2005-11-21T14:49:00.000+08:00</published><updated>2005-12-18T03:56:53.956+08:00</updated><title type='text'>Getting started_: your first app</title><content type='html'>&lt;ol&gt;   &lt;/ol&gt;After &lt;a href="http://netcf2.blogspot.com/2005/11/getting-started-install-tools.html"&gt;installing the tools&lt;/a&gt;, we are ready to roll.&lt;span class="fullpost"&gt;

&lt;ol&gt;   &lt;li&gt;Start Visual Studio 2005.&lt;/li&gt;    &lt;li&gt;Click File-&gt; New-&gt; Project.&lt;/li&gt;   &lt;li&gt;In the "Project types" panel on the left, under Visual C# (&lt;span style="font-style: italic;"&gt;yes, we're using C# here&lt;/span&gt;), expand Smart Device, and select &lt;span style="font-weight: bold;"&gt;Windows Mobile 5.0 Pocket PC&lt;/span&gt; (if you do not see this, check that you &lt;a href="http://netcf2.blogspot.com/2005/11/getting-started-install-tools.html"&gt;install the SDK&lt;/a&gt;). In the "Templates" panel, select &lt;span style="font-weight: bold;"&gt;Device Application&lt;/span&gt;.&lt;/li&gt;   &lt;li&gt;Give your project a suitable name, specify a location to save your files, and click OK.&lt;/li&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/firstapp1.1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/firstapp1.jpg" alt="" border="0" /&gt;&lt;/a&gt;
&lt;li&gt;You should see a PDA skin in the design view. Click on it and press F4 to go to the properties panel. Change the Text property to "My First App". Also, change the Minimize Box property to False. Notice that the little cross at the top-right corner of your form is now an ok button. This ensures that the application is closed when the user clicks on the ok button (&lt;span style="font-style: italic;"&gt;as opposed to being minimized and still running in the background&lt;/span&gt;).
&lt;/li&gt;&lt;li&gt;Next, drag a Label control and a Button control to the form. Change the Text property of the label to an empty string, and the Text property of the button to "Click Me!"&lt;/li&gt;   &lt;li&gt;Now, double-click on the button that you just added. You should see the Code view.&lt;/li&gt;   &lt;li&gt;Type the following line in the button1_Click method:&lt;/li&gt;&lt;span style="color: rgb(0, 0, 102);font-family:verdana;font-size:85%;"  &gt;   &lt;blockquote&gt;label1.Text = "Hello World!";
&lt;/blockquote&gt; &lt;/span&gt;&lt;li&gt;Click Ctrl-F5 to build the application and deploy. When prompted on where to deploy to, select Windows Mobile 5.0 Pocket PC Phone Emulator (&lt;span style="font-style: italic;"&gt;or if you prefer, any WM5 Pocket PC emulator, but the phone is the best in my opinion!&lt;/span&gt;)
&lt;/li&gt;&lt;li&gt;You should see the emulator running your first app. Click on the button and voila! (&lt;span style="font-style: italic;"&gt;To close, click the ok button at the top right to close your app, and close the emulator. When asked to save state, click Yes.&lt;/span&gt;)
&lt;/li&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/2609/601/1600/firstapp2.0.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/2609/601/320/firstapp2.0.jpg" alt="" border="0" /&gt;&lt;/a&gt; &lt;/ol&gt;
Where to go next? See &lt;a href="http://netcf2.blogspot.com/2005/11/getting-started-using-emulator.html"&gt;this&lt;/a&gt; for some tips when using the emulator, and &lt;a href="http://netcf2.blogspot.com/2005/11/controls-browser-in-your-app.html"&gt;this&lt;/a&gt; for your second mini project on writing your own browser app!
&lt;br/&gt;&lt;br/&gt;
&lt;span style="font-size:85%;"&gt;Categories: [&lt;a href="http://search.blogger.com/?ie=UTF-8&amp;ui=blg&amp;bl_url=netcf2.blogspot.com&amp;x=0&amp;y=0&amp;scoring=d&amp;as_q=getting%20started_"&gt;Getting started_&lt;/a&gt;]
Tags: [&lt;a href="http://www.technorati.com/tags/netcf2" rel="tag"&gt;netcf2&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/compact+framework" rel="tag"&gt;Compact Framework&lt;/a&gt;] [&lt;a href="http://www.technorati.com/tags/windows+mobile" rel="tag"&gt;Windows Mobile&lt;/a&gt;]&lt;/span&gt;&lt;/span&gt;</content><link rel='alternate' type='text/html' href='http://netcf2.blogspot.com/2005/11/getting-started-your-first-app.html' title='Getting started_: your first app'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=19142344&amp;postID=113255754248966013&amp;isPopup=true' title='1 Comments'/><link rel='replies' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/113255754248966013/comments/default' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://netcf2.blogspot.com/feeds/posts/default/113255754248966013'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/19142344/posts/default/113255754248966013'/><author><name>danchong</name><uri>http://www.blogger.com/profile/12935398754747138118</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-19142344.post-113247781741442779</id><published>2005-11-20T17:09:00.000+08:00</published><updated>2005-12-28T23:00:44.440+08:00</updated><title type='text'>Getting started_: install the tools</title><content type='html'>&lt;ol&gt;   &lt;/ol&gt;Welcome to this blog on the Microsoft .NET Compact Framework 2.0. You can look forward to lots of simple examples to kick start your development.&lt;span class="fullpost"&gt;

&lt;ol&gt;   &lt;li&gt;Install &lt;span style="font-weight: bold;"&gt;Visual Studio .NET 2005 (Standard, Professional or Team System edition)&lt;/span&gt;. I am using the Professional edition.&lt;/li&gt;    &lt;li&gt;Install the latest &lt;span style="font-weight: bold;"&gt;ActiveSync&lt;/span&gt;. As of this writing, the version is &lt;span style="font-weight: bold;"&gt;4.1&lt;/span&gt;, downloadable &lt;a href="http://www.microsoft.com/windowsmobile/downloads/activesync41.mspx" target="_blank"&gt;here&lt;/a&gt