Mam rozwiązanie css vs2010, które działało dobrze wczoraj.SEHException był nieobsługiwany
Kiedy próbuję uruchomić instancję debugowania dzisiaj, ciągle otrzymuję komunikat o błędzie SEHException
.
Ten błąd jest zgłaszany w metodzie uruchamiania formularza InitializeComponent
.
Jakieś pomysły?
Oto StackTrace:
System.Runtime.InteropServices.SEHException was unhandled
Message=External component has thrown an exception.
Source=System.Drawing
ErrorCode=-2147467259
StackTrace:
at System.Drawing.SafeNativeMethods.Gdip.GdipCreateFontFromLogfontW(HandleRef hdc, Object lf, IntPtr& font)
at System.Drawing.Font.FromLogFont(Object lf, IntPtr hdc)
at System.Drawing.Font.FromHfont(IntPtr hfont)
at System.Drawing.SystemFonts.get_DefaultFont()
at System.Windows.Forms.Control.get_DefaultFont()
at System.Windows.Forms.Control.GetDefaultFontHandleWrapper()
at System.Windows.Forms.Control.get_FontHandle()
at System.Windows.Forms.ContainerControl.GetFontAutoScaleDimensions()
at System.Windows.Forms.ContainerControl.get_CurrentAutoScaleDimensions()
at System.Windows.Forms.ContainerControl.get_AutoScaleFactor()
at System.Windows.Forms.ContainerControl.PerformAutoScale(Boolean includedBounds, Boolean excludedBounds)
at System.Windows.Forms.ContainerControl.PerformNeededAutoScaleOnLayout()
at System.Windows.Forms.Form.OnLayout(LayoutEventArgs levent)
at System.Windows.Forms.Control.PerformLayout(LayoutEventArgs args)
at System.Windows.Forms.Control.System.Windows.Forms.Layout.IArrangedElement.PerformLayout(IArrangedElement affectedElement, String affectedProperty)
at System.Windows.Forms.ContainerControl.LayoutScalingNeeded()
at System.Windows.Forms.ContainerControl.set_AutoScaleMode(AutoScaleMode value)
at FirstWindow.Form1.InitializeComponent() in C:\Users\Ash\Documents\Visual Studio 2010\Projects\FrameworkClientV2 - No Security\FirstWindow\Form1.designer.cs:line 32
at FirstWindow.Form1..ctor() in C:\Users\Ash\Documents\Visual Studio 2010\Projects\FrameworkClientV2 - No Security\FirstWindow\Form1.cs:line 27
at FirstWindow.Program.Main() in C:\Users\Ash\Documents\Visual Studio 2010\Projects\FrameworkClientV2 - No Security\FirstWindow\Program.cs:line 18
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
na losowej pamiętać mój gf złamałam ekranie laptopa ostatniej nocy tak Im działa na monitorze zewnętrznym ... może to mieć coś wspólnego z tym?
Oto kod i błędne linia ..
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
///////////////////The line below throws the exception
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
///////////////////////////////
this.Text = "Form1";
}
możliwy duplikat [Jak należy zdiagnozować błąd SEHException - Komponent zewnętrzny ma wyjątek] (http://stackoverflow.com/questions/1313853/how-should-you-diagnose-the-error-sehexception-external -component-has-throw-an) –
Bardzo wątpię, że shenaniganie twojej lepszej połowy mają cokolwiek wspólnego z tym wyjątkiem :) –
Warto było spróbować moo :) Ponieważ wygląda na to, że wyjątek ma coś wspólnego z funkcją automatycznego skalowania Zastanawiałem się, czy inne rozdzielczości monitorów mogą mieć z tym coś wspólnego. – user589195