我想知道是否可以将图像添加到VBA中的消息框主要是,但如果不是任何其他语言.
MsgReply = MsgBox("InspectionCreator - Continue?", vbMsgBoxSetForeground + vbSystemModal + vbYesNo)
If vbYes = MsgReply Then
Listener.Connect2SW
Else: End
End If
Run Code Online (Sandbox Code Playgroud) 如果我有错误,如何在C#中将它发送到如下所示的错误处理行.我知道如何在visual basic中做到这一点,但在C#中需要一些帮助.谢谢您的帮助
Sub Main()
On Error GoTo ErrHand
....Code Here
End Sub
ErrHand:
MsgBox "Message Here"
End Sub
Run Code Online (Sandbox Code Playgroud) 无法将"z"替换为下面的代码.任何帮助都是极好的.谢谢
//Generate Nut Part Number
textBox7.Text = "MLA028Z-CAN-" + comboBox2.Text + "R" + "-" + comboBox3.Text + "z" + "0";
//Replaces z Variable in Lead Screw Assembly Part Number
if (comboBox1.Text == "0")
textBox6.Text.Replace("z", "B");
else if (comboBox1.Text == "1")
textBox7.Text.Replace("z", "D");
else if (comboBox1.Text == "2")
textBox7.Text.Replace("z", "D");
else if (comboBox1.Text == "3")
textBox7.Text.Replace("z", "D");
else if (comboBox1.Text == "4")
textBox7.Text.Replace("z", "D");
else if (comboBox1.Text == "5")
textBox7.Text.Replace("z", "D");
else if (comboBox1.Text == "6")
textBox7.Text.Replace("z", "D");
else if (comboBox1.Text …Run Code Online (Sandbox Code Playgroud) 我试图使用按钮将两个数字的总和,如350 + 400添加到蒙面文本框.对不起,我对C#很新.任何帮助表示赞赏.谢谢
private void button11_Click(object sender, EventArgs e)
{
maskedTextBox2.Text.Sum = 350 + 400
}
Run Code Online (Sandbox Code Playgroud) 需要帮助从其他蒙版文本框*.0628获取总和
private void button11_Click(object sender, EventArgs e)
{
maskedTextBox2.Text = (
maskedTextBox1.Text *.0628 + //Cost of Rail
200
).ToString();
}
Run Code Online (Sandbox Code Playgroud) 无论如何,您是否可以将文本框格式设置为始终具有四个小数位?我知道如何使用掩码文本框使用C#和Visual Basic,但由于缺乏功能,vba更具挑战性.任何帮助将不胜感激.谢谢
Public Sub UserForm_Initialize()
TextBox6.Text = Format(Number, "###.####")
End Sub
Run Code Online (Sandbox Code Playgroud) 我想在我的消息框中显示文本框文本不断收到错误.
MessageBox.Show(textBox1.text + "Saved As PDF");
Run Code Online (Sandbox Code Playgroud)
而错误是
Error 1 'System.Windows.Forms.TextBox' does not contain a definition for
'text' and no extension method 'text' accepting a first argument of type
'System.Windows.Forms.TextBox' could be found (are you missing a using
directive or an assembly reference?)
R:\Engineer\Russell Saari\CONFIGURATOR MODELS\MLD028 Userform (C# Coding)\WindowsFormsApplication2\MLD028D Actuator Form Complete.cs 118 38 WindowsFormsApplication
Run Code Online (Sandbox Code Playgroud)