ツールボックスからフォームにコントロールを問題なくドロップできますが、コントロールをフォームにドラッグ アンド ドロップすると、次のエラー メッセージが表示されます。
"The control System.Windows.Forms.DataGridView has thrown an unhandled exception in the designer and has been disabled.
Exception:
Value cannot be null.
Parameter name: child"
そして、コントロールにエラー画像を描画します。このエラーは私のフォームの 1 つでのみ発生しており、デバッグするとすべてが正常に実行されます。これは大きな問題ではありませんが、この特定のフォームでコントロールを移動するたびにこのエラーが発生し、コントロール全体にエラー画像が描画されると、かなり面倒になります。エラー画像がコントロールに表示するメッセージは次のとおりです。
"System.ArgumentNullException: Value cannot be null.
Parameter name: child
at System.Windows.Forms.Control.ControlCollection.SetChildIndexInternal(Control child, Int32 newIndex)
at System.Windows.Forms.Control.ControlCollection.SetChildIndex(Control child, Int32 newIndex)
at Microsoft.VisualBasic.PowerPacks.Design.EventManager.Reparent(ShapeContainer shCon)
at Microsoft.VisualBasic.PowersPacks.Design.EventManager.OnEndDrag(Object sender, BehaviorDragDropEventArgs e)
at System.Windows.Forms.Design.Behavior.BehaviorService.OnEndDrag(BehaviorDragDropEventArgs e)
at System.Windows.Forms.Design.Behavior.BehaviorService.DoDragDrop(DropSourceBehavior dropSourceBehavior)
at System.Windows.Forms.Design.ControlDesigner.OnMouseDragMove(Int32 x, Int32 y)
at System.Windows.Forms.Design.ControlDesigner.WndProc(Message& m)
at System.Windows.Forms.Design.ControlDesigner.DesignerWindowTarget.OnMessage(Message& m)"
ありがとう、どんな助けでも大歓迎です。