Frage

Auf einigen Computern stürzt unsere Windows -Formulare jedes Mal ab, wenn Sie bestimmte Formulare mit diesem Anrufstack öffnen:

Object reference not set to an instance of an object.
   at System.Windows.Forms.Form.OnVisibleChanged(EventArgs e)
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at DevExpress.XtraEditors.XtraForm.WndProc(Message& msg)
   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)
War es hilfreich?

Lösung

Wenn das Feature Bewegen Sie den Zeiger automatisch auf die Standardtaste ist im Bedienfeld aktiviert, die Anwendung stürzt ab in Form.OnVisibleChanged Wenn Form AcceptButton leitet sich nicht aus Windows.Forms.Control.

Dies ist eindeutig ein Fehler in Windows -Formularen, die Dokumentation Sagt das nicht IButtonControl AcceptButton muss aus Control.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top