Wednesday, June 04, 2003
Samsung just impressed the hell out of me. They have two new absolutely gorgeous devices. One is a PocketPC Phone Edition - i700, soon available through Sprint. It's beautiful, shiny and has a camera capable of 640x480. The other one really left me drooling. It is their new SmartPhone - i600. I think it is the first (or one of the first) flip-smart-phones. Me, I'm usually happier with a smaller form factor. This one has a size of StarTAC. And everything you would expect from latest generation smartphone inside. Now to wait 'till it becomes available.
6/4/2003 8:43:39 AM (Pacific Daylight Time, UTC-07:00)  #    Comments [0]  | 

First day of Ask The Experts I was helping out in the Microsoft's Windows 2003 Server booth. Amazingly (not!) most of the questions were turning around the suggested upgrade path. "Can I upgrade my NT4 only domain?" "Can I keep 2K member servers in native 2003 forest?" "Can I...". Amazingly most of the answers are available one level down from http://www.microsoft.com/windowsserver2003/default.mspx

Oh, well. By now I'm used to the fact that most people do not read the available documentation and besides it is always easier to ask...

6/4/2003 8:38:07 AM (Pacific Daylight Time, UTC-07:00)  #    Comments [0]  | 
 Friday, May 30, 2003
Tomorrow morning I'm flying to Dallas for a week of TechEd 2003. See y'all in a week. This promises to be fun.
5/30/2003 11:44:03 AM (Pacific Daylight Time, UTC-07:00)  #    Comments [1]  | 
 Friday, May 23, 2003

OpenNETCF.Callbacks library is a rather powerful tool that can be used to significantly enhance the functionality of CF application. Its primary use is to allow using APIs that require the developer to provide a callback function, such as EnumWindows etc. An unexpected bonus is an ability to subclass an arbitrary window, including those behind CF intrinsic controls (Form, Textbox, Label etc). For example the only way to process Help menu item in Window CE is for the application window to handle WM_HELP message. The Form object does not provide such facility, but by subclassing the main form it is possible to intercept this message and process it, presenting user with the help page.

Download the sample here: http://www.alexfeinman.com/download.asp?doc=TabTest.zip

5/23/2003 4:36:36 PM (Pacific Daylight Time, UTC-07:00)  #    Comments [11]  | 
 Tuesday, May 20, 2003
I just wanted to clarify an issue that comes up once in a while. It is rather poorly documented and can make one spend some time figuring it out.
Many times a developer writing CF code would do something like this:
    
    
MyForm form = new MyForm(); 
form.ShowDialog(); 
... rest of the function 
    
What do you expect to happen to the form when the variable goes out of scope? It is supposed to become a victim of the garbage collector, right? Wrong. To see what really happens let's consider even simpler case:
Control c = new Control();
c = null;
You would think simply creating the control will have it unattached to anything (like a parent control) and thus subject to garbage collection. Apparently not so. If we look inside the Control object constructor, we will see that upon creation the Control is added to an internally maintained list of all controls in the application:
Control()
{
   ... create new control...
   Control.m_rlctlMaster.Add(this);
   ... do more housekeeping
}
m_rlctlMaster is an ArrayList - an internal static member of Control class. The repercussions of the above action are rather obvious - the control is always referenced by the control list. It refrence count never becomes zero unless you destroy it explicitly.
When control is destroyed, it destroys all its child controls. This means that you do not have to explicitly kill every label, textbox and panel - it is enough to delete the form. If however the control was dynamically removed from the parent form:
myPanel.Parent = null;
or
myForm.Controls.Remove(myPanel);
it becomes orphaned and needs to be destroyed explicitly by calling Control.Dispose()
Same thing is true for forms. What the code in the beginning of this post is missing is form.Dispose(). Without it the form and all its controls will stay in memory consuming resources and eventually will bog down the whole application
5/20/2003 12:34:39 PM (Pacific Daylight Time, UTC-07:00)  #    Comments [1]  |