我收到错误消息无法访问已处置的对象.对象名称:'ApplicationProperties'.当我在关闭它之后尝试重新打开表单时.我注意到这是从退出表单,并退出是"处置"它们,所以我已将以下代码放在我的所有接受按钮,并取消按钮(任何关闭表单的按钮).
this.Hide();
this.Parent = null;
Run Code Online (Sandbox Code Playgroud)
这段代码只是隐藏了表单.没有关闭表格.
所以我的问题是,当我单击表单上的"x"按钮,然后尝试重新打开表单时仍然会收到错误消息.我尝试了几种不同的方法来修改表单的现有功能,例如:
private void ApplicationProperties_FormClosing(object sender, FormClosingEventArgs e)
{
//Hiding the window, because closing it makes the window unaccessible.
this.Hide();
this.Parent = null;
}
Run Code Online (Sandbox Code Playgroud)
但这让我没有运气.我想知道是否有人知道如何解决这个问题.这是在我的取消和接受按钮内为我工作的代码.关闭表单的所有按钮都是一样的.
private void OptionsCancelbtn_Click(object sender, EventArgs e)
{
//Hiding the window, because closing it makes the window unaccessible.
this.Hide();
this.Parent = null;
}
Run Code Online (Sandbox Code Playgroud)
我已经在form1的类顶部声明了实例,并在form1中有一个打开form2的按钮.
public partial class MainBox : Form
{
//Making a name for the ApplicationProperties form. It can be opened when called.
ApplicationProperties ApplicationPropertiesWindow …Run Code Online (Sandbox Code Playgroud) 我的问题不是一个编程问题,更多的是如何使用该软件.好吧,我有一个文件,其中包含我的所有网页存储过程(大约100个存储过程).当我打开文件时,我最小化了存储过程,因此文件更容易筛选.我想知道是否有任何方法可以同时最小化所有存储过程.
我知道在Visual Studio中你可以突出显示CNTRL + M + M按下的所有代码,它将最小化所有功能.在SQL Server 2012中有类似的东西吗?
谢谢.
我正在尝试将倒数计时器放入我的程序中,但是当我运行程序时,它不会倒计时.它跳到一个,就是这样.
Private Sub CompactTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CompactTimer.Tick
Dim Time As Integer = 11
Do Until Time = 0
ClockLabel.Text = "Compacting database in: " & Time
Time -= 1
Loop
End Sub
Run Code Online (Sandbox Code Playgroud)
我也启动了计时器并在Form_Load routuine中将间隔声明为500.
我试图从文本框中删除一定数量的字符后删除文本.我使用以下代码:
Private Sub MainTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MainTextBox.TextChanged
If MainTextBox.Text.Length >= 50 Then
MainTextBox.Text.Remove(1, 10)
End If
End Sub
Run Code Online (Sandbox Code Playgroud)
当我执行代码时,它不会给我任何错误消息或代码运行完美的任何内容,但它不会删除我想要的文本.有帮助吗?
我目前有Visual Studio 2010 Express Visual Basic.我想知道无论如何我都可以在线下载C#tmeplate而无需下载Visual Studio 2010 C#Express.我试过搜索在线模板,我找不到它.
我有一个字符串数组,除了它们的一部分外,它们都是相似的,例如:
["1234 - Active - Workroom",
"1224 - Active - Breakroom",
"2365 - Active - Shop"]
Run Code Online (Sandbox Code Playgroud)
我已经想出要按ID号排序我只使用JavaScript函数.sort(),但我无法弄清楚如何按区域对字符串进行排序(例如:"Workroom etc ..").
我想要得到的是:
["1224 - Active - Breakroom",
"2365 - Active - Shop",
"1234 - Active - Workroom"]
Run Code Online (Sandbox Code Playgroud)
"活动"部分将始终相同.
从我在网上找到的,我必须使用.sort()覆盖方法对其进行排序,但我无法弄清楚我需要在override方法中进行更改.
就在最近,我在尝试通过 Firebase 部署我的函数时开始遇到问题。运行命令时firebase deploy --only functions,我的四个函数之一部署正确,但其他三个函数在 firebase-tools 控制台中抛出此错误:
部署错误。构建失败:构建错误详细信息不可用。请检查url 上的日志到我的 GCP 日志
当我查看日志时,为每个失败的函数显示的错误消息是:
错误:构建步骤 3“us.gcr.io/fn-img/buildpacks/nodejs10/builder:nodejs10_20200922_20_RC00”失败:步骤以非零状态退出:46
我已经搜索和谷歌搜索了很长一段时间,但我找不到任何人报告相同的错误代码、返回相同的非零状态或在第 3 步中函数失败。似乎没有太多关于故障排除的文档错误。
希望这里有人能指出我正确的方向。
谢谢!
我收到错误我的代码中的Forte Sender.exe中发生了未处理的类型'System.StackOverflowException'的异常.我理解这意味着我的代码中存在无限循环,但我似乎无法找到这个循环.这是我的代码:
Form1中:
public partial class MainBox : Form
{
//Making a name for the ApplicationProperties form. It can be opened when called.
ApplicationProperties ApplicationPropertiesWindow = new ApplicationProperties();
//All of the functions for form1 below.
Run Code Online (Sandbox Code Playgroud)
窗体2:
public partial class ApplicationProperties : Form
{
MainBox MainBoxWindow = new MainBox();
//All of the funcitons for form2 below.
Run Code Online (Sandbox Code Playgroud)
所以我注意到,如果我拿出MainBox MainBoxWindow = new MainBox();那个程序将正确运行.但我需要那个实例来调用Form1中的函数.我怎样才能解决这个问题?要么以不同的方式调用函数,要么解决无限循环.
我想知道是否使用以下方式将列添加到表中:
alter table Jobs
add Complete boolean
Run Code Online (Sandbox Code Playgroud)
这会清除当前表中的所有数据吗?我正在使用SQL Server Management Studio 2012
我想要做的是每50个字符串读取一行文本.我试图在interger上找到一个reaminder函数GlobalVariables.TransferTracker,但我在网上找不到任何东西.有没有这样的功能?或者不同/更好的方法来做到这一点?如果它有帮助,这是我的代码:
Do While TransferRecord.Read()
'Start of writing to the SQL server.
SQLServerConnection.Open()
'SQL statement to transfer all the data that fits the requirements to the SQL server.
Dim SQLCommand1 As New SqlCommand("INSERT INTO dbo.b_Pulp_PI_Forte (" & _
"mill, " & _
"keyprinter_datetime, " & _
"bale_line_num, " & _
"pulp_line_id, " & _
"bale_id, " & _
"drop_datetime, " & _
"layboy_position, " & _
"bale_gross_weight, " & _
"gross_value_flag, " & _
"bale_airdry_pct, " & _
"airdry_value_flag, …Run Code Online (Sandbox Code Playgroud) 我在win表单中有两个文本框,用户将输入信息.我想在用户开始输入时清除文本框.我正在使用TextChanged事件处理程序,因此每次键入它都会擦除,这使我无法在文本框中键入任何内容.这是我正在使用的代码:
private void TXTBX_HourlyRatae_TextChanged(object sender, EventArgs e)
{
TXTBX.HourlyRate.Clear();
TXTBX.HoursWorked.Clear();
}
Run Code Online (Sandbox Code Playgroud)
据我所知,每当我输入文本框时,我都会执行此事件处理程序,但我不知道如何在第一次输入文本框时才执行它.