Hello,
Our desktop application has been running error free for quite some time. We have customers who wish to use 120dpi resolution settingson their desktops due to poor eye sight and/or preference.
When we run our application in 120DPI, we receive the elusive "Parameter is not valid." error on map.Refresh. It is highly difficult to recreate in a seperate application as our application features two map objects that interact with each other. I find it odd that changing the dpi settings takes our solid app and essentially introduces intermittent errors of this nature.
I was able to get around the majority of map.refresh errors by doing map.refresh(map.overlays) which is really very odd for me to even have to do... still, I was going to go with it.
The only problem is now I am seeming generating this error on draw somewhere inside of your component or on another thread inside of your component (I think the former because no invocation error msg comes up but the stack trace does make mention of threading.), I belive this because the error no longer points to any line of code in my project when the exception occurs.
Message: "Parameter is not valid."
Source: "DesktopEdition"
StackTrace: " at ThinkGeo.MapSuite.DesktopEdition.Overlay.Draw(GeoCanvas canvas)\r\n at ThinkGeo.MapSuite.DesktopEdition.WinformsMap.x03e3d48bcfe7bb6c(IEnumerable`1 xa6f0db4f183189f1)\r\n at ThinkGeo.MapSuite.DesktopEdition.WinformsMap.xff5b27c00f9678c2(RectangleShape x178b193eec228e6e)\r\n at ThinkGeo.MapSuite.DesktopEdition.WinformsMap.xe3cee4adb9c72451()\r\n at ThinkGeo.MapSuite.DesktopEdition.WinformsMap.x9ac8c50f434f4b39(Int32 xb565f4681f05557a)\r\n at ThinkGeo.MapSuite.DesktopEdition.WinformsMap.OnPaint(PaintEventArgs e)\r\n at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)\r\n at System.Windows.Forms.Control.WmPaint(Message& m)\r\n at System.Windows.Forms.Control.WndProc(Message& m)\r\n at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)\r\n at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)\r\n at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)\r\n at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)\r\n at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)\r\n at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)\r\n at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)\r\n at System.Windows.Forms.Application.Run(ApplicationContext context)\r\n at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()\r\n at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()\r\n at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)\r\n at GeoTMSMapViewer.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81\r\n at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)\r\n at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)\r\n at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()\r\n at System.Threading.ThreadHelper.ThreadStart_Context(Object state)\r\n at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n at System.Threading.ThreadHelper.ThreadStart()"
TargetSite: {Void Draw(ThinkGeo.MapSuite.Core.GeoCanvas)}
DeclaringMethod: '((System.Type)(((System.Reflection.MemberInfo)(((System.Exception)($exception)).TargetSite)).ReflectedType)).DeclaringMethod' threw an exception of type 'System.InvalidOperationException'
[System.SystemException {System.InvalidOperationException}] {"Method may only be called on a Type for which Type.IsGenericParameter is true."}
If this sounds like something that needs a support ticket, please let me know so I can open one up.
Thanks.