【发布时间】:2023-03-23 06:35:02
【问题描述】:
我正在使用 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)
....
...
..
.
当我插入断点时,我将它放在代码的第一行注释上。当我运行程序时,它会将我带到断点,并且在红点上方有那个黄色箭头。我按下按钮移动箭头并打开窗口,但是黄色箭头消失了,除非我按下主窗体上的按钮之一,否则我无法在程序中进一步移动。除了这个之外,所有其他表单都可以正常工作和运行。
【问题讨论】:
-
我刚刚添加了有关何时添加断点的更多详细信息。我可以添加它们,但是一旦我尝试将其移动到下一行,我尝试加载的表单就会弹出,并且断点上方的黄色错误消失了,我无法再移动它。
-
这是 x64 操作系统上的一个已知问题。 stackoverflow.com/questions/1583351/…
标签: vb.net visual-studio-2010 forms form-load