Thursday, July 03, 2008

Mastering the Windows Mobile Emulators

The latest versions of the Windows Mobile 6 Professional and Standard SDKs allow you to test phone and SMS functionalities using the built-in Cellular Emulator—without needing to use a physical device. Learn how to master the Windows Mobile emulators.

在Windows Mobile中应用智能设备框架(Smart Device Framework)

Sometime back in Dec 2007 I wrote an article on using OpenNETCF's Smart Device Framework (Using the Smart Device Framework for Windows Mobile Development‏). A reader from China,
YuanHui, has done a great job translating it into Chinese. If you are a Chinese reader, do check out the article in Chinese here.

Tip: Convert image to byte array and vice versa

Very often, when you are developing a Windows Mobile application you need to convert an image displayed in a PictureBox control to a byte array. You can do so using:

public byte[] ImageToByteArray(Image img)
{
MemoryStream ms = new MemoryStream();
img.Save(ms, System.Drawing.Imaging.ImageFormat.Gif);
return ms.ToArray();
}


You can call this function like this:

byte[] data = ImageToByteArray(pictureBox1.Image);

Conversely, if you want to convert a byte array to back to an image so that it can be displayed in a PictureBox control, you can use the following function:

public Image ByteArrayToImage(byte[] data)
{
MemoryStream ms = new MemoryStream(data);
Image img = new Bitmap(ms);
return img;
}

You can use this as follows:

pictureBox2.Image = ByteArrayToImage(data);

Sunday, June 29, 2008

Build Occasionally Connected Systems Using Sync Services for ADO.NET v1.0

When workers aren't always connected, Occasionally Connected Systems (OCS) can help. Find out how Visual Studio 8's Sync Services for ADO.NET enables OCS, synchronizing databases between different devices and computers.

Persisting Data in Your Windows Mobile Device

Learn about the three methods of persisting data and which is the right one for your device.

Thursday, June 19, 2008

Build Occasionally Connected Systems Using Sync Services for ADO.NET v1.0

When workers aren't always connected, Occasionally Connected Systems (OCS) can help. Find out how Visual Studio 8's Sync Services for ADO.NET enables OCS, synchronizing databases between different devices and computers.

Wednesday, June 18, 2008

New Courses - Windows Mobile & AJAX

Foundation of Windows Mobile Programming (25th July 2008) - S$399
This course will introduce to participants the various techniques to program their Windows Mobile 6 devices. This feature-packed course will show you how to get started in Windows Mobile development, right from the start till deployment.

* Introduction to the Windows Mobile platform
* Introduction to Windows Mobile 6
- Windows Mobile 6 Classic, Standard, and Professional
* UI Design and guidelines
- Orientation aware and screen-resolution aware
* File I/O
* Integrating with built-in applications
- Outlook Mobile
- Calendar
- Tasks
* Web services
- Developing web services
- Consuming web services
- Transferring binary data using web services
* Database Access
- Database access using SQL Server Compact Edition
- Database synchronization using Remote Data Access (RDA)
* Deploying Windows Mobile applications o Creating CAB files

Programming ASP.NET 3.5 AJAX (28th July) - S$399
This course is targeted at Web developers who need to get jumpstarted to ASP.NET 3.5 AJAX
development in the shortest amount of time. It will introduce to participants the various
techniques to AJAX-enable their Web applications using the latest ASP.NET 3.5 AJAX framework.

* Architecture of the ASP.NET AJAX Framework
* How to update part of a Web page without a page reload
* How to auto-complete user inputs
* How to update a panel at regular intervals
* How to create a panel that’s always floating and visible
* How to populate a DropDownList control without a page refresh
* How to display a confirmation dialog on a page
* How to call Web/WCF services directly from a web page
* How to access the properties of a Profile property from a Web page
* How to add drag and drop functionality to a control
* How to give users control of the information shown by a panel

Details and application forms to be published shortly!

Monday, June 16, 2008

.NET Tip - Get the filename, not the path

One of the problems with using the OpenFileDialog class is that the FileName property always returns the full path name of the file:

OpenFileDialog openFileDialog1 = new OpenFileDialog()
{
Filter = "Text files (*.jpg)*.jpg"
};

Console.WriteLine(openFileDialog1.FileName); //---e.g. C:\Windows\text.txt---

To retrieve only the filename and not the path, feed it to the FileInfo class, like this:

FileInfo fi = new FileInfo(openFileDialog1.FileName);
Console.WriteLine(fi.Name); //---text.txt---
Console.WriteLine(fi.Directory); //---C:\Windows---

Cool, isn't it?

Wednesday, June 04, 2008

Windows SideShow for Windows Mobile Developer Preview

Microsoft has just released the Windows SideShow for Windows Mobile Developer Preview, an application for Windows Mobile 5.0 and 6 devices that converts your Windows Mobile device into a SideShow device. Go check it out and this is a good time to check out my book as well. I am proud to say that it also been translated into Spanish and Russian! ;-)

Friday, May 30, 2008

Keeping Up with the Joneses: Windows Mobile 6.1's New Upgrades

With their Windows Mobile 6.1 release, Microsoft attempts to keep their position in an increasingly competitive market. Find out how these new improvements can benefit you.

Windows Mobile: Communicating with the Outside World

Explore the various options available on the .NET Compact Framework that allow your apps to connect with the outside world.

Tuesday, May 27, 2008

Learning Windows Communication Foundation course (16th June 2008)

If you have not enrolled in the Learning Windows Communication Foundation course yet, be sure to do so this week as the early bird discount ($100; fee is $299 after discount) ends this week. After that, the full price of $399 will apply.

Here are the things you will learn in this course:

• Introduction to the Windows Communication Foundation
• The ABCs of WCF
• Developing WCF Service Library using Visual Studio 2008
• Developing a WCF Service and consuming a WCF Service
• Consuming a WCF Service asynchronously
• Deploying WCF Services
• Implementing Callbacks using WCF
• Implementing Transactions using WCF
• Securing WCF Services

In addition, you will:
* build a Cinema Ticketing application project using WCF that shows in real-time the number of seats booked and seats remaining!
* learn about the latest synchronization technology using Sync Services for ADO.NET and how you can synchronize your database over a WCF service.

Tuesday, May 20, 2008

Learning Windows Communication Foundation (WCF) - 16th June 2008 (Mon)

By now, you must have heard of one of the latest buzzwords in the industry – WCF (Windows Communication Foundation).

According to Microsoft,

Windows Communication Foundation (WCF) is Microsoft’s latest technology for developing service-oriented applications. WCF simplifies development of connected applications through a new service-oriented programming model. WCF supports many styles of distributed application development by providing a layered architecture. At its base, the WCF channel architecture provides asynchronous, untyped message-passing primitives. Built on top of this base are protocol facilities for secure, reliable, transacted data exchange and broad choice of transport and encoding options.

You may also have attended numerous conference sessions on WCF. Most presentations focus on explaining the rationale and the motivation behind WCF. But what really is WCF from a developer’s point of view? How does a typical “hello, world” WCF application look like?

In this one-day workshop, you will learn the basics of building a WCF service and how to test it. At the end of the workshop, you would have a solid understanding of the capabilities of WCF and how you can use it to develop SOA (service-oriented architecture) applications!

DATE
Time: 9am to 5pm.
16th June 2008 (Mon)

COURSE FEE
S$399
Register before 31st May and receive S$100 discount (S$299 after discount).
Inclusive of 1 lunch and 2 tea breaks

Thursday, May 15, 2008

Free 1/2 Workshop on Windows Mobile 6 Programming

Have you ever wondered how you can program your Windows Mobile 6 device but do not know how to get started? Now, you can can jumpstarted in Windows Mobile 6 programming in half a day! And for FREE!

Here are the details:
* You need to bring along your own notebook for the course.
* You need to preinstall your own notebook with Visual Studio 2008 Professional (free 90-day trial edition is available for download from Microsoft's web site). Instructions on what to install will be emailed to selected participants.
* This workshop is intended for beginners to Windows Mobile development (if you are already developing Windows Mobile applications, then you are not the target audience for this course).
* At the end of the workshop, you will achieve the following:
- Learn how to get started in Windows Mobile programming
- Understand how to use the Windows Mobile emulators for testing
- Understand how to use the Cellular Emulator for testing phone and SMS messaging applications
- How to test your application using a real device
- How to deploy an application after development
- Basic understanding of the .NET Compact Framework 3.5
- Ready to embrace enterprise-ready applications

Venue
Motorola Enterprise Mobility Business
230 Victoria Street #12-06/10
Bugis Junction Office Tower
Singapore 188024

Date: 6 June 2008 (Fri)
Session #1: 9am to 12.30pm
Session #2: 1pm to 4.30pm

As spaces are limited, registrations are on first-come-first-serve basis (subject to maximum 2 seats per company). Please send an email to weimenglee@learn2develop.net, indicating the session you would like to attend.

Saturday, May 03, 2008

Book - Inside Steve's Brain

If you are a fan of Apple then you must also be a fan of Steve Jobs. If that is the case, I think you will enjoy this latest book by Leander Kahney - Inside Steve's Brain. Leander Kahney is also the author of The Cult of Mac and Cult of iPod.

In his latest book, Leander talked about what made Apple so special, with Steve Jobs at the helm. If you think that working under a fussy and demanding boss is a bad thing, think again. The bright side to this is that your work will be much more refined and of higher quality. And that's why Apple's products are so different from the rest of the competitors.

Overall, this book is an easy and interesting read and made me rethink about the quality of my work. If you are always curious about Steve Jobs and how he works, I strongly recommend this book. I have enjoyed it greatly and I am sure you will too. And one more thing, hug your fussy and perfectionist boss the next time you meet him at the office - he drives the best out of you.

Cruising the Interstate with Windows Mobile 6 Development

One benefit of choosing Microsoft technologies for your mobile apps is an integrated, streamlined development process. Find out how easy it is with this tutorial on the basics of developing Windows Mobile apps with the the .NET Compact Framework.

My new book - C# 2008 Programmer's Reference

I guess the cat is out of the bag...I am now working hard on my latest book - C# 2008 Programmer's Reference. This book covers all the important things you need to know to become a proficient C# programmer. It covers C# 3.0 using Visual Studio 2008. It will also include several chapters on developing Windows, Web, Silverlight, and Windows Mobile applications. Writing this book is actually much more involved than I had earlier expected, but I am enjoying every minute of it. When will be it be out? Well, sometime 3Q this year.

Pre-order it now. ;-)

Kindle-ready - Practical .NET 2.0 Networking Projects

I am excited to learn that my book - Practical .NET 2.0 Networking Projects, is now available on the Amazon.com's Kindle.

I have always wanted to be able to bring my books along with me when I travel, but I do not want to lug 10kg of paper with me. With Kindle, it is now possible to bring your favorite books with you without needing to worry about extra luggage. I think this is especially useful for technology books, which nowadays are huge - usually more than 1000 pages.

Right now, here are the various books that I want to put on my Kindle: Silverlight, ASP.NET 3.5, WCF, and iPhone. ;-)

If Kindle allows me to load my PDF documents onto it, I will give it a perfect score. Never mind if you say that it looks fugly...like Amazon said, when using the Kindle you are not suppose to know its presence.

Thursday, April 17, 2008

3 new Visual Studio 2008 courses in June 2008!

I have just launched 3 new courses in Jun 2008! Here are the 3 courses:
Course #1: Learning C# 3.0 (11th June 2008 Wednesday)
Course #2: Foundation of Windows mobile programming (12th June 2008 Thursday)
Course #3: Programming ASP.NET 3.5 AJAX (13th June 2008 friday)

For more information, please download the course brochure here.

Sunday, April 13, 2008

Media Guide

Wei-Meng Lee introduces the Silverlight MediaPlayer control, and demonstrates how to use it to save development time and effort.

Download the free PDF issue of aspnetPro magazine here.

Implementing Drag and Drop in Your Windows Application

One of the important features of Graphical User Interfaces (GUI) is drag and drop.Using a mouse you can drag and drop a file from one location to another or you may drag a file and drop it onto an application to launch it.

However, not many developers take the effort to implement drag and drop functionality in their applications. While it does take considerable effort to implement, the support for drag and drop in your application will greatly increase its usefulness. In this article, I will show you how to implement drag and drop functionality in your Windows Forms application.

Adding Multi-Touch to Your Windows Mobile Application's User Interface

What if you could convert your devices to use the kind multi-touch technology you see in an iPhone? It requires modifications to the OS and an overhaul to the entire UI, but it can be done.

What's New in Visual Basic 9.0? Part 2

The release of Visual Studio 2008 updates Visual Basic to version 9.0, with several key language enhancements and LINQ support. Part Two of this series will walk you through VB 9's new LINQ support features and other time-saving enhancements.

What's New in Visual Basic 9.0? Part 1

The release of Visual Studio 2008 updates Visual Basic to version 9.0, with several key language enhancements and LINQ support. Part one of this series will walk you through using nullable types, type inference, the If operator, and other time-saving enhancements.

Friday, March 21, 2008

New Course - Windows Mobile Network Programming and Hardware Interfacing using the .NET Compact Framework

This course introduces to participants the various techniques to program their Windows Mobile 5.0/6 Pocket PC devices to communicate with the outside world. Far from being an introductory course, this lab-intensive course will show you how to interface with external devices and communicate wirelessly with other devices.

What you will learn
* Introduction to the Windows Mobile 5.0/6 SDK
* Introduction to the .NET Compact Framework
* Using the Cellular Emulator
* Communicating with the outside world:
- SMS
- Web Services
- Infrared
- Bluetooth (Serial port)
- Sockets
* Interfacing with External devices
- Camera
- Barcode Reader
- GPS receivers
- Smart card reader
*Projects
- Implementing a call manager using SMS messaging
- Building a location-aware application using GPS
- Transferring Binary Data using Web Services
- Transferring data using infrared
- Data Synchronization using Sockets
- Activating the built-in camera
- 1D/2D Barcode scanning using the built-in camera
- Reading magnetic card information
- Accessing the SIM card information
- Voice recording using the OpenNetCF’s Smart Device Framework

Date
* Time: 9am to 5pm daily
* 25th April 2008

Course Fee
* $299
* Inclusive of 1 lunch and 2 tea breaks

Venue
* Motorola Enterprise Mobility Business
230 Victoria Street #12-06/10
Bugis Junction Office Tower
Singapore 188024

Download application form here.

Sunday, March 16, 2008

New Jumpstart Course - ASP.NET 3.5 AJAX

SYNOPSIS
This course is targeted at Web developers who need to get jumpstarted to ASP.NET 3.5 AJAX development in the shortest amount of time. It will introduce to participants the various techniques to AJAX-enable their Web applications using the latest ASP.NET 3.5 AJAX framework.

WHAT YOU WILL LEARN

  • Architecture of the ASP.NET AJAX Framework
  • How to update part of a Web page without a page reload
  • How to auto-complete user inputs
  • How to update a panel at regular intervals
  • How to create a panel that’s always floating and visible
  • How to populate a DropDownList control without a page refresh
  • How to display a confirmation dialog on a page
  • How to call Web/WCF services directly from a web page
  • How to access the properties of a Profile property from a Web page
  • How to add drag and drop functionality to a control
  • How to give users control of the information shown by a panel
DATE
  • 1 day, 9am to 5pm.
  • 18th April 2008 (Fri)
COURSE FEE
  • S$299
  • Inclusive of 1 lunch and 2 tea breaks
VENUE
HDB Learning Center
HDB Hub 480 Lorong 6,
Toa Payoh
Singapore 310480

Download the course application here.

Tuesday, March 11, 2008

New Jumpstart series of courses!

I am excited to announce that I will be launching a new series of courses next month. This new series is known as the JumpStart series.

What is the Jumpstart series?
Developers like you and I are constantly faced with the prospects of learning new technologies. And often, products literatures are often littered with jargons to make the technology look impressive. But to developers, what they want to know is really how it works, what can it do, and how do they do it. It is with this philosophy that the Jumpstart series of courses is designed. All Jumpstart courses are 1-day in duration and true to the developers' spirit they contain intensive lab exercises. You won't get product advertisements; what you get are labs after labs of hands-on exercises that show what you need to know about a technology. At the end of the day, you would have enough knowledge to explore the technology on your own and create more sophisticated solutions.

And to companies, we understand that cost is one huge factor to consider when deciding to send staff for training. Hence, all Jumpstart courses are priced at S$299.

So what are the new courses?
For a start, we will be rolling out the following courses:
  • 18th April - ASP.NET 3.5 AJAX
  • 25th April - Windows Communication Foundation (WCF)
  • In the pipeline - Developing Offline Windows Mobile Web applications using Google Gears
  • In the pipeline - Developing Silverlight 2 Applications

Check this site for updates as application forms will be available shortly. Meantime, if you are interested in any of the above two courses, send me an email at: weimenglee@learn2develop.net.

Monday, March 10, 2008

Free Mobility Touchdown Workshop - April 9-11 2008

I am proud to inform you that in collaboration with Microsoft, Development Learning Solutions has been appointed to conduct the Mobility Touchdown workshop in 2008.

The Mobility Touchdown workshop is a 3-day hands-on course that covers all the important topics related to Windows Mobile development. It covers topics like the .NET Compact Framework 3.5, SQL Mobile, Windows Mobile application design, and more.

The target audiences for this course are:
· ISVs who have not gone into Windows Mobile development but who are thinking about it
· ISVs who are planning to extend their LOB application to Windows mobile
· Institute of Higher Learnings (IHLs) who need to teach and/or supervise mobility modules/projects

If you are interested in this course, please send an email to weimenglee@learn2develop.net with the following information. If you are selected, you will be able to attend the 3-day course at no cost to you (you will, however, be responsible for your own travel and expenses).

Company:
Name:
Designation:
Primary business:
Plans revolving Windows Mobile (please provide as much details as you can):

As seats are limited, please provide as much information as you can so that we can correctly determine your eligibility for the course. Selected participants will be notified 2 weeks before the commencement of the course.

Training Date
· April 9-11 2008

Venue
· Microsoft Singapore
· Lab PCs will be provided for the training.

Tuesday, February 19, 2008

Learn .NET 3.5 core technologies, WPF, WCF and more

Sign up for the What is new in Visual Studio 2008 & .NET 3.5 course and learn some of the latest .NET 3.5 technologies. Here are some exciting things you will learn:

* New controls in ASP.NET 3.5.
* Foundations of WCF (Windows Communication Foundation).
* Learn how to write WCF callback applications. Callbacks are useful for building client-server applications like chat and messaging applications.
* Foundations of WPF (Windows Presentation Foundation).
* Learn how to spice up your Windows application using XAML.

DATE
• Time: 9am to 5pm daily
• 12th to 14th (Wed to Fri) March 2008


COURSE FEES
• $1099
• To qualify for Early Bird Discount, register at least 2 participants from the same company ($899 after discount)
• Inclusive of 1 lunch and 2 tea breaks for each day

Untapped Silverlight Powers: Create Your Own Media Player

My previous article on Silverlight demonstrated how to use the MediaElement control to playback media files. This bare-bones control simply plays back a media file—it does not have visual controls allowing you to pause or advance the media (although you can do this programmatically). This article will show you how to build a Silverlight application that reassembles the YouTube player, allowing you to visually control the playback of the media.