ben.nicholls
Posts: 6
Joined: 2015-10-19
|
Hello,
We've had a customer come across an issue in our addin when minimising a form region in Outlook. If the display scaling is set to 150% an exception is thrown and a red cross/box is drawn in the form region.
The specific environment is Windows 10 x64 with Office 2010 x86 and Add-in Express 8.2.4371. Outlook 2013 and 2016 don't experience the issue.
The exception thrown is...
Error Hexigo.AddinModule.OutlookFormsManager_OnError System.ArgumentOutOfRangeException: Parameter must be positive and < Width.
Parameter name: x
at System.Drawing.Bitmap.GetPixel(Int32 x, Int32 y)
at AddinExpress.Extensions.ADXContainerControl.OnDrawText(DrawTextArgs e)
at AddinExpress.Extensions.SkinPainter.DrawPaneTextIndex(Graphics dc, Rectangle rect, Int32 index, ADXDrawControlState state)
at AddinExpress.Extensions.AdxPanePartGalleryItemCaption.Paint(Graphics dc)
at AddinExpress.Extensions.DrawArgs.DrawControls()
at AddinExpress.Extensions.ADXContainerControl.OnDrawContainerItem(DrawContainerItemArgs e)
at AddinExpress.Extensions.AdxPanePartGalleryItem.Paint(Graphics dc)
at AddinExpress.Extensions.AdxPanePartGalleryItems.Paint(Graphics dc)
at AddinExpress.Extensions.AdxPanePart.Paint(Graphics dc)
at AddinExpress.Extensions.DrawArgs.DrawControls()
at AddinExpress.Extensions.ADXContainerControl.OnDrawHeader(DrawArgs e)
at AddinExpress.Extensions.AdxPanePartHeader.Paint(Graphics dc)
at AddinExpress.Extensions.DrawArgs.DrawControls()
at AddinExpress.Extensions.ADXContainerControl.OnDraw(DrawContainerControlArgs e)
at AddinExpress.Extensions.AdxPanePartMain.Paint(Graphics dc)
at AddinExpress.Extensions.ADXContainerControl.PaintBitmap(Int32 AWidth, Int32 AHeight)
at AddinExpress.Extensions.ADXContainerControl.PaintTo(IntPtr destDC, Int32 X, Int32 Y)
at AddinExpress.Extensions.ADXContainerControl.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at AddinExpress.Extensions.ADXContainerControl.WndProc(Message& m) System.ArgumentOutOfRangeException: Parameter must be positive and < Width.
Parameter name: x
at System.Drawing.Bitmap.GetPixel(Int32 x, Int32 y)
at AddinExpress.Extensions.ADXContainerControl.OnDrawText(DrawTextArgs e)
at AddinExpress.Extensions.SkinPainter.DrawPaneTextIndex(Graphics dc, Rectangle rect, Int32 index, ADXDrawControlState state)
at AddinExpress.Extensions.AdxPanePartGalleryItemCaption.Paint(Graphics dc)
at AddinExpress.Extensions.DrawArgs.DrawControls()
at AddinExpress.Extensions.ADXContainerControl.OnDrawContainerItem(DrawContainerItemArgs e)
at AddinExpress.Extensions.AdxPanePartGalleryItem.Paint(Graphics dc)
at AddinExpress.Extensions.AdxPanePartGalleryItems.Paint(Graphics dc)
at AddinExpress.Extensions.AdxPanePart.Paint(Graphics dc)
at AddinExpress.Extensions.DrawArgs.DrawControls()
at AddinExpress.Extensions.ADXContainerControl.OnDrawHeader(DrawArgs e)
at AddinExpress.Extensions.AdxPanePartHeader.Paint(Graphics dc)
at AddinExpress.Extensions.DrawArgs.DrawControls()
at AddinExpress.Extensions.ADXContainerControl.OnDraw(DrawContainerControlArgs e)
at AddinExpress.Extensions.AdxPanePartMain.Paint(Graphics dc)
at AddinExpress.Extensions.ADXContainerControl.PaintBitmap(Int32 AWidth, Int32 AHeight)
at AddinExpress.Extensions.ADXContainerControl.PaintTo(IntPtr destDC, Int32 X, Int32 Y)
at AddinExpress.Extensions.ADXContainerControl.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at AddinExpress.Extensions.ADXContainerControl.WndProc(Message& m)
I have been able to replicate this with a blank project which I can send on request, but the steps to replicate it are as follows...
Create a project, minimum office version 2010, support Outlook only.
Add an ADXOlForm to the project
Add an ADXOlFormsManager to the AddinModule design surface
Add a new entry to the Items property and set the following properties...
* ExplorerItemTypes: Mail
* ExplorerLayout: DockRight
* AlwaysShowHeader: True
* FormClassName: <the ADXOlForm>
Make sure the windows scaling is set to 150% (Display Settings > Advanced Display Settings > Advanced sizing of text and other items > set a custom scaling level > Scale to this percentage of normal size: 150%)
Run Outlook and click the >> button to minimize the region. An exception will be thrown and the red cross/box will be drawn, this will remain even if you expand the region. |
|
Andrei Smolin
Add-in Express team
Posts: 18793
Joined: 2006-05-11
|
Hello Ben,
In a couple of minutes I'll send you a download link for the assembly which fixes the issue for us. Please let me know if it fixes the issue for you.
Andrei Smolin
Add-in Express Team Leader |
|
wehbi
Posts: 76
Joined: 2013-10-31
|
Hello Andrei,
is there a solution for this problem?
Regards,
Birger |
|
Andrei Smolin
Add-in Express team
Posts: 18793
Joined: 2006-05-11
|
Hello Birger,
The fix is included in Add-in Express 8.3. Does it work for you?
Andrei Smolin
Add-in Express Team Leader |
|