0
我嘗試在面板在運行時添加文本框,但我得到的錯誤:未處理的異常時,附加控制運行
An unhandled exception of type 'System.NullReferenceException' occurred in Judge.exe
Additional information: Object reference not set to an instance of an object.
,我的代碼是:
Dim nl As New TextBox
AddHandler nl.LostFocus, AddressOf lost_focus
nl.Focus()
Panel1.Container.Add(nl)
我用子添加它和我從其他形式 及其UserControl調用它。
謝謝。
一如既往,異常發生在哪一行? – Neolisk