Just trying this out, a great idea. But having problems:
When I try to save a new profile I get Microsoft.NET Framework error box showing:
Unhandled exception has occurred in your application. If you dick Continue, the application will ignore this error and attempt to continue. If you dick Quit, the application will close immediately.
There was an error generating the XML document.
The details show:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
** Exception Text **
System.InvalidOperationException: There was an error generating the XML document. ---> System.InvalidOperationException: Instance validation error: '65791' is not a valid value for MonitorSwitcherGUI.CCDWrapper.D3DmdtVideoSignalStandard.
at System.Xml.Serialization.XmlCustomFormatter.FromEnum(Int64 val, String[] vals, Int64[] ids, String typeName)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDisplayConfigTargetMode.Write4_D3DmdtVideoSignalStandard(D3DmdtVideoSignalStandard v)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDisplayConfigTargetMode.Write6_DisplayConfigVideoSignalInfo(String n, String ns, DisplayConfigVideoSignalInfo o, Boolean needType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDisplayConfigTargetMode.Write7_DisplayConfigTargetMode(String n, String ns, DisplayConfigTargetMode o, Boolean needType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDisplayConfigTargetMode.Write8_DisplayConfigTargetMode(Object o)
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
at MonitorSwitcherGUI.MonitorSwitcher.SaveDisplaySettings(String fileName)
at MonitorSwitcherGUI.MonitorSwitcherGUI.OnMenuSaveAs(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.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)
** JIT Debugging **
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
My setup:
win10, laptop monitor + TV on hdmi out, 2 x monitor on USB3 fresco adaptors.
Any ideas?, must say drives me crazy keep setting up my screens, even after sleeping! I do find just 1 fresco USB3 adaptor is not too bad, but the 2 seems to upset it, even more so when the screens have different characteristics.
Hope you can fix
cheers Pete
P.S. tried loading an xml file but got another Microsoft.NET Framework error box.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just trying this out, a great idea. But having problems:
When I try to save a new profile I get Microsoft.NET Framework error box showing:
Unhandled exception has occurred in your application. If you dick Continue, the application will ignore this error and attempt to continue. If you dick Quit, the application will close immediately.
There was an error generating the XML document.
The details show:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
** Exception Text **
System.InvalidOperationException: There was an error generating the XML document. ---> System.InvalidOperationException: Instance validation error: '65791' is not a valid value for MonitorSwitcherGUI.CCDWrapper.D3DmdtVideoSignalStandard.
at System.Xml.Serialization.XmlCustomFormatter.FromEnum(Int64 val, String[] vals, Int64[] ids, String typeName)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDisplayConfigTargetMode.Write4_D3DmdtVideoSignalStandard(D3DmdtVideoSignalStandard v)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDisplayConfigTargetMode.Write6_DisplayConfigVideoSignalInfo(String n, String ns, DisplayConfigVideoSignalInfo o, Boolean needType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDisplayConfigTargetMode.Write7_DisplayConfigTargetMode(String n, String ns, DisplayConfigTargetMode o, Boolean needType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterDisplayConfigTargetMode.Write8_DisplayConfigTargetMode(Object o)
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
at MonitorSwitcherGUI.MonitorSwitcher.SaveDisplaySettings(String fileName)
at MonitorSwitcherGUI.MonitorSwitcherGUI.OnMenuSaveAs(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.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)
** Loaded Assemblies **
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
MonitorSwitcherGUI
Assembly Version: 0.5.2.0
Win32 Version: 0.5.2.0
CodeBase: file:///C:/Monitor%20Profile%20Switcher/MonitorSwitcherGUI.exe
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
System
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
MonitorSwitcher
Assembly Version: 0.5.2.0
Win32 Version: 0.5.2.0
CodeBase: file:///C:/Monitor%20Profile%20Switcher/MonitorSwitcher.EXE
Microsoft.GeneratedCode
Assembly Version: 1.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
Microsoft.GeneratedCode
Assembly Version: 1.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
Microsoft.GeneratedCode
Assembly Version: 1.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
Microsoft.GeneratedCode
Assembly Version: 1.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
Microsoft.GeneratedCode
Assembly Version: 1.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
** JIT Debugging **
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitdebugging="true">
</system.windows.forms></configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
I tried all the ideas in topic MS .NET Framework Error
https://sourceforge.net/p/monitorswitcher/discussion/bugs/thread/8d2b5a7c/
but nothing seems to work.
The profiles are saved in C:\Users\Pete\AppData\Roaming\MonitorSwitcher\Profiles e.g.:
<displaysettings><pathinfoarray><displayconfigpathinfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><sourceinfo><adapterid><lowpart>38323</lowpart><highpart>0</highpart></adapterid><id>0</id><modeinfoidx>1</modeinfoidx><statusflags>InUse</statusflags></sourceinfo><targetinfo><adapterid><lowpart>38323</lowpart><highpart>0</highpart></adapterid><id>265988</id><modeinfoidx>0</modeinfoidx><outputtechnology>Internal</outputtechnology><rotation>Identity</rotation><scaling>Identity</scaling><refreshrate><numerator>141400000</numerator><denominator>2356200</denominator></refreshrate><scanlineordering>Progressive</scanlineordering><targetavailable>true</targetavailable><statusflags>InUse</statusflags></targetinfo><flags>1</flags></displayconfigpathinfo><displayconfigpathinfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><sourceinfo><adapterid><lowpart>38323</lowpart><highpart>0</highpart></adapterid><id>1</id><modeinfoidx>3</modeinfoidx><statusflags>InUse</statusflags></sourceinfo><targetinfo><adapterid><lowpart>38323</lowpart><highpart>0</highpart></adapterid><id>198147</id><modeinfoidx>2</modeinfoidx><outputtechnology>Hdmi</outputtechnology><rotation>Identity</rotation><scaling>Identity</scaling><refreshrate><numerator>74175824</numerator><denominator>1237500</denominator></refreshrate><scanlineordering>Interlaced</scanlineordering><targetavailable>true</targetavailable><statusflags>InUse</statusflags></targetinfo><flags>1</flags></displayconfigpathinfo><displayconfigpathinfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><sourceinfo><adapterid><lowpart>31915237</lowpart><highpart>0</highpart></adapterid><id>0</id><modeinfoidx>5</modeinfoidx><statusflags>InUse</statusflags></sourceinfo><targetinfo><adapterid><lowpart>31915237</lowpart><highpart>0</highpart></adapterid><id>256</id><modeinfoidx>4</modeinfoidx><outputtechnology>Hd15</outputtechnology><rotation>Identity</rotation><scaling>Identity</scaling><refreshrate><numerator>60</numerator><denominator>1</denominator></refreshrate><scanlineordering>Progressive</scanlineordering><targetavailable>true</targetavailable><statusflags>InUse FORCIBLE</statusflags></targetinfo><flags>1</flags></displayconfigpathinfo><displayconfigpathinfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><sourceinfo><adapterid><lowpart>52091915</lowpart><highpart>0</highpart></adapterid><id>0</id><modeinfoidx>7</modeinfoidx><statusflags>InUse</statusflags></sourceinfo><targetinfo><adapterid><lowpart>52091915</lowpart><highpart>0</highpart></adapterid><id>256</id><modeinfoidx>6</modeinfoidx><outputtechnology>Hd15</outputtechnology><rotation>Identity</rotation><scaling>Identity</scaling><refreshrate><numerator>60</numerator><denominator>1</denominator></refreshrate><scanlineordering>Progressive</scanlineordering><targetavailable>true</targetavailable><statusflags>InUse FORCIBLE</statusflags></targetinfo><flags>1</flags></displayconfigpathinfo></pathinfoarray><modeinfoarray><modeinfo><id>265988</id><luid xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><lowpart>38323</lowpart><highpart>0</highpart></luid><displayconfigmodeinfotype>Target</displayconfigmodeinfotype><displayconfigtargetmode xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><targetvideosignalinfo><pixelrate>141400000</pixelrate><hsyncfreq><numerator>66013</numerator><denominator>1</denominator></hsyncfreq><vsyncfreq><numerator>141400000</numerator><denominator>2356200</denominator></vsyncfreq><activesize><cx>1920</cx><cy>1080</cy></activesize><totalsize><cx>2142</cx><cy>1100</cy></totalsize><videostandard>Other</videostandard><scanlineordering>Progressive</scanlineordering></targetvideosignalinfo></displayconfigtargetmode></modeinfo><modeinfo><id>0</id><luid xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><lowpart>38323</lowpart><highpart>0</highpart></luid><displayconfigmodeinfotype>Source</displayconfigmodeinfotype><displayconfigsourcemode xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><width>1920</width><height>1080</height><pixelformat>Pixelformat32Bpp</pixelformat><position><x>0</x><y>0</y></position></displayconfigsourcemode></modeinfo><modeinfo><id>198147</id><luid xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><lowpart>38323</lowpart><highpart>0</highpart></luid><displayconfigmodeinfotype>Target</displayconfigmodeinfotype><displayconfigtargetmode xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><targetvideosignalinfo><pixelrate>74175824</pixelrate><hsyncfreq><numerator>33750</numerator><denominator>1</denominator></hsyncfreq><vsyncfreq><numerator>74175824</numerator><denominator>1237500</denominator></vsyncfreq><activesize><cx>1920</cx><cy>1080</cy></activesize><totalsize><cx>2200</cx><cy>1124</cy></totalsize><videostandard>Other</videostandard><scanlineordering>Interlaced</scanlineordering></targetvideosignalinfo></displayconfigtargetmode></modeinfo><modeinfo><id>1</id><luid xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><lowpart>38323</lowpart><highpart>0</highpart></luid><displayconfigmodeinfotype>Source</displayconfigmodeinfotype><displayconfigsourcemode xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><width>1920</width><height>1080</height><pixelformat>Pixelformat32Bpp</pixelformat><position><x>-1920</x><y>-518</y></position></displayconfigsourcemode></modeinfo><modeinfo><id>256</id><luid xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><lowpart>31915237</lowpart><highpart>0</highpart></luid><displayconfigmodeinfotype>Target</displayconfigmodeinfotype></modeinfo></modeinfoarray></displaysettings>
My setup:
win10, laptop monitor + TV on hdmi out, 2 x monitor on USB3 fresco adaptors.
Any ideas?, must say drives me crazy keep setting up my screens, even after sleeping! I do find just 1 fresco USB3 adaptor is not too bad, but the 2 seems to upset it, even more so when the screens have different characteristics.
Hope you can fix
cheers Pete
P.S. tried loading an xml file but got another Microsoft.NET Framework error box.
Try the latest version, this should fix the problem