Ji Zhou ¨C MSFT
Hi Ben,
I do not think this is an Outlook Add-in issue. I tried both Outlook Add-in developed by VSTO and VSTO SE in Visual Studio 2005. But I still cannot reproduce your scenario.
These are the main steps I performed:
1. Create a new Outlook 2003 Add-in project with VSTO SE;
2. Add an UserControl1 to the project created before;
3. Drag a comboBox named comboBox on the UserControl1, then double click the UserControl1 and copy your codes before comboBox_DrawItem into UserControl1_Load method. Copy whole of your comboBox_DrawItem() into the UserControl1 Class as a method.
4. Implement the Outlook.PropertyPage interface for your UserControl. And register the ComVisiable attribute to true of UserControl1 Class.
5. In ThisAddin_Startup, add event to this.Application.OptionsPagesAdd event. In the event handle, use Pages.Add(new UserControl1(), ¡°Test¡±).
6. Run the solution. When I navigate to new added OptionPage, MessageBox shows up with information ¡°Draw called¡±.
If I have any misunderstanding about steps to reproduce your issue, please feel free to point it out.
Still, I think error should exist in your codes of UserControl. If you can reproduce it in minimum codes, and post all of them here. That will be more helpful for us to locate the problem.
Thanks
Ji