Hi, My Name is Edmundo Guerrero
I am working with the following tools:
The Problem.
When I instantiate the UltraWingGrid.ExcelExport as shown below:
If e.Tool.Key = "Exportar a Excel" Then
Dim HojaExcel As New UltraGridExcelExporter
HojaExcel.Export(Me.UltraGrid1, "c:\pais.xls")
Process.Start("c:\pais.xls")
End If
and run the program the following errors message displayed:
System.ArgumentException was unhandled by user code
Message=Parameter is not valid.
Source=System.Drawing
StackTrace:
at System.Drawing.Graphics.GetHdc()
at Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter..ctor()
at MenuPrincipal.pais.UltraToolbarsManager1_ToolClick1(Object sender, ToolClickEventArgs e) in E:\Sistema Minerva2010\MP\MP100\MenuPrincipal\pais.vb:line 281
at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.OnToolClick(ToolClickEventArgs e)
at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.FireEvent(ToolbarEventIds id, EventArgs e)
at Infragistics.Win.UltraWinToolbars.ToolBase.OnToolClick()
at Infragistics.Win.UltraWinToolbars.ButtonToolUIElement.DoClickProcessing(MouseEventArgs e)
at Infragistics.Win.UltraWinToolbars.ButtonToolUIElement.OnMouseUp(MouseEventArgs e)
at Infragistics.Win.ControlUIElementBase.ProcessMouseUpHelper(Object sender, MouseEventArgs e)
at Infragistics.Win.ControlUIElementBase.ProcessMouseUp(Object sender, MouseEventArgs e)
at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e)
at Infragistics.Win.UltraControlBase.OnMouseUp(MouseEventArgs e)
at Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
InnerException:
Thank you very much in advance for a quick response.
Edmundo Guerrero
That seems like plenty of processing power and memory to me - unless you are trying to export a huge number of rows.
How long does it take to raise the exception? Does this happen immediately as soon as you begin the export, or does it take a while?
If you can post a small sample project (or even a large one as long as we can run it) demonstrating the error, we could take a look at it.
Hi Mike, thanks again for your help.
We have a total of 3 UltraExplorerBar, and we have set animation to false in all of them.
About the computer, it is a Core2Duo at 2.26Ghz, 2Gb RAM running WinXP. I know it is low, but should run the application fluently.
theabdabs said:Unfortunately that didn't solve the error.
Are you saying that you have UltraExplorerBar controls in your application and you turned off the animation on all of them and you are still having a problem?
Or are you saying you simply aren't using UltraExplorerBar, so my suggestion does not help?
theabdabs said:The problem is only happening in a low resource computer, just as if it helps.
How low are the resources? It's certainly possible that this exception can occur if the machine simply doesn't have enough memory to create a Graphics object.
Unfortunately that didn't solve the error. I think we'll have to play with UltraGridExcelExporter options.
The problem is only happening in a low resource computer, just as if it helps.
Thanks
Hi,
theabdabs said:but the error is raising in UltraExcelExporter.
The bug I am referring to was a bug in the UltraExplorerBar, but it was essentially a bug in the way the ExplorerBar was doing some caching which is shared by all of the Infragistics WinForms components. So the fact that the exception occurred in the UltraGridExcelExporter doesn't necessarily rule out the ExplorerBar issue as the cause.
The easiest way to tell is to find all of the UltraExplorerBar controls in your solution and set AnimationsEnabled on each one to False.
If that does not help, then the issue you are experiencing must be something new. In which case, we would need to be able to duplicate it in order to assist you. Can you post a small sample project demonstrating the exception?