我正在使用 VS 2010,VB.net 中的代码。无论出于何种原因,我的 Form1.Load(在我的应用程序中,它称为 Form.JNA)都不会运行。它根本不会执行该子例程中的任何代码。有谁知道为什么会这样?
我的主要表格称为 FormJNA。我不知道包括代码的开头是否有帮助,所以在这里。我知道它不起作用,因为 boolConfirmed 永远不是真的,并且 textReqDate 文本框是空的。
Private Sub FormJNA_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
'Close the database in case it was left open
All.rstRecordSet.Close()
All.conConnection.Close()
strEmailServer = All.GetEmailServer("tblEmailServer", "Server") 'retrieves the email name from JNADB
boolConfirmed = True 'set as true since there is no data to be confirmed. this prevents a popup window warning the user of unconfirmed data
'For live date in application window
Timer1.Start()
txtReqDate.Text = DateValue(Now)
....
...
..
.
当我插入断点时,我将它放在代码的第一行注释上。当我运行程序时,它会将我带到断点,并且在红点上方有那个黄色箭头。我按下按钮移动箭头并打开窗口,但是黄色箭头消失了,除非我按下主窗体上的按钮之一,否则我无法在程序中进一步移动。除了这个之外,所有其他形式的工作和运行都很好。