Hi
The addin's load behavior is controled by the registry key.
When we register a MapPoint addin, there will be a registry key created as
below.
[HKEY_USERS\<user
sid>\Software\Microsoft\MapPoint\AddIns\MapPointTestAddin.Connect]
"FriendlyName"="MapPointAddin"
"Description"="Make a test for MapPoint 2004"
"LoadBehavior"=dword:00000003
LoadBehavior DWORD Integer indicating load behavior: 0 (None), 3 (Startup),
9 (Load on Demand), or 16 (Load At Next Startup Only)
Commonly the key will be 3 means the addin will be loaded when the mappoint
is started.
Also based on my test I can not reproduce the problems, can you give a
simple reproduce sample, e.g. you may try to build the reproduce sample
based the below test sample.(e.g. just use a simple form to simplified the
problem).
Here is my code snippet.
public void OnConnection(object application,
Extensibility.ext_ConnectMode connectMode, object addInInst, ref
System.Array custom)
{
applicationObject = application;
addInInstance = addInInst;
MessageBox.Show("Addin Connected");
Form1 fm = new Form1();
fm.Show();
}
private void Form1_Load(object sender, System.EventArgs e)
{
try
{
throw new NullReferenceException("Test Exception");
}
catch(Exception ex)
{
Debug.WriteLine(ex.ToString());
}
}
Best regards,
Perter Huang
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.