Wednesday, May 12, 2010

Outlook error "Unable to open the Outlook window"

Yesterday I encounter an error in my Outlook. It is able to run but when it at the stage of opening the email window, it prompts the error "Unable to open the Outlook window". Or something similar, I can't remember the exact text.

I did some tracing and found that it is trying to read something from a XML.
C:\Documents and Settings\\Application Data\Microsoft\Outlook\Outlook.xml

My copy of the XML file is corrupted. Fortunately, I have a backup of it. I replaced the corrupted copy and my Outlook is back working.

Sunday, April 25, 2010

MapInfo : Setting default drawing Style

How to set the default drawing Style for the AddMapTool ?

AddMapToolProperties addMapToolProperties = mapControl1.Tools.AddMapToolProperties as AddMapToolProperties;
CompositeStyle cs = addMapToolProperties.CompositeStyle;
LineWidth lw = new LineWidth(5, LineWidthUnit.Pixel);
SimpleLineStyle ls = new SimpleLineStyle(lw, 2, Color.Blue, false);
addMapToolProperties.CompositeStyle.LineStyle = ls;

You create the AddMapToolProperties and change the CompositeStyle according to what you want and then use this addMapToolProperties when creating your AddMapTool.