代码总是报错,求帮忙修改

LaoYuFuqjiaowodiaoyu 2016-10-19 03:39:57
// 工程计算.cpp: 主项目文件。
//主项目文件.cpp
#include "iostream.h"
#include "Form1.h"

using namespace g;

[STAThreadAttribute]
int main(array<System::String ^> ^args)
{
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
Application::Run(gcnew Form1());
return 0;
}





//Form1.h文件
#pragma once
#include<iostream>
namespace g {

using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: 在此处添加构造函数代码
//
}

protected:
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
~Form1()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::Label^ label1;
protected:
private: System::Windows::Forms::TextBox^ textBox1;
private: System::Windows::Forms::TextBox^ textBox2;
private: System::Windows::Forms::Label^ label2;
private: System::Windows::Forms::TextBox^ textBox3;
private: System::Windows::Forms::Label^ label3;
private: System::Windows::Forms::TextBox^ textBox4;
private: System::Windows::Forms::Label^ label4;
private: System::Windows::Forms::GroupBox^ groupBox1;
private: System::Windows::Forms::TextBox^ textBox6;
private: System::Windows::Forms::Label^ label7;
private: System::Windows::Forms::TextBox^ textBox5;
private: System::Windows::Forms::Label^ label5;
private: System::Windows::Forms::Label^ label6;
private: System::Windows::Forms::ComboBox^ comboBox1;
private: System::Windows::Forms::PictureBox^ pictureBox1;
private: System::Windows::Forms::Label^ label10;
private: System::Windows::Forms::ComboBox^ comboBox3;
private: System::Windows::Forms::Label^ label9;
private: System::Windows::Forms::ComboBox^ comboBox2;
private: System::Windows::Forms::TextBox^ textBox7;
private: System::Windows::Forms::Label^ label8;
private: System::Windows::Forms::Label^ label13;
private: System::Windows::Forms::TextBox^ textBox8;
private: System::Windows::Forms::GroupBox^ groupBox2;
private: System::Windows::Forms::TextBox^ textBox13;
private: System::Windows::Forms::Label^ label16;
private: System::Windows::Forms::TextBox^ textBox11;
private: System::Windows::Forms::Label^ label14;
private: System::Windows::Forms::TextBox^ textBox10;
private: System::Windows::Forms::Label^ label12;
private: System::Windows::Forms::TextBox^ textBox9;
private: System::Windows::Forms::Label^ label11;
private: System::Windows::Forms::Button^ button2;
private: System::Windows::Forms::Button^ button1;
private: System::Windows::Forms::Label^ label18;
private: System::Windows::Forms::Label^ label17;
private: System::Windows::Forms::Label^ label15;
private: System::Windows::Forms::GroupBox^ groupBox3;
private: System::Windows::Forms::Label^ label20;
private: System::Windows::Forms::ComboBox^ comboBox5;
private: System::Windows::Forms::TextBox^ textBox12;
private: System::Windows::Forms::Label^ label21;
private: System::Windows::Forms::Label^ label23;
private: System::Windows::Forms::ComboBox^ comboBox6;
private: System::Windows::Forms::PictureBox^ pictureBox2;
private: System::Windows::Forms::Button^ button3;
private: System::Windows::Forms::GroupBox^ groupBox4;
private: System::Windows::Forms::Label^ label28;
private: System::Windows::Forms::TextBox^ textBox17;
private: System::Windows::Forms::Label^ label29;
private: System::Windows::Forms::Label^ label26;
private: System::Windows::Forms::TextBox^ textBox16;
private: System::Windows::Forms::Label^ label27;
private: System::Windows::Forms::Label^ label24;
private: System::Windows::Forms::TextBox^ textBox15;
private: System::Windows::Forms::Label^ label25;
private: System::Windows::Forms::Label^ label19;
private: System::Windows::Forms::TextBox^ textBox14;
private: System::Windows::Forms::Label^ label22;
private: System::Windows::Forms::Button^ button4;
private: System::Windows::Forms::Button^ button6;
private: System::Windows::Forms::Button^ button5;
private: System::Windows::Forms::Button^ button9;
private: System::Windows::Forms::Button^ button10;
private: System::Windows::Forms::Button^ button7;
private: System::Windows::Forms::TextBox^ textBox18;
private: System::Windows::Forms::Button^ button8;

private:
/// <summary>
/// 必需的设计器变量。
/// </summary>
System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
...全文
1140 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
补上 // // textBox11 // this->textBox11->Location = System::Drawing::Point(37, 167); this->textBox11->Name = L"textBox11"; this->textBox11->Size = System::Drawing::Size(47, 21); this->textBox11->TabIndex = 21; // // label14 // this->label14->AutoSize = true; this->label14->Location = System::Drawing::Point(14, 170); this->label14->Name = L"label14"; this->label14->Size = System::Drawing::Size(23, 12); this->label14->TabIndex = 20; this->label14->Text = L"v23"; // // textBox13 // this->textBox13->Location = System::Drawing::Point(37, 95); this->textBox13->Name = L"textBox13"; this->textBox13->Size = System::Drawing::Size(47, 21); this->textBox13->TabIndex = 23; // // label16 // this->label16->AutoSize = true; this->label16->Location = System::Drawing::Point(14, 99); this->label16->Name = L"label16"; this->label16->Size = System::Drawing::Size(23, 12); this->label16->TabIndex = 22; this->label16->Text = L"G12"; // // label15 // this->label15->AutoSize = true; this->label15->Location = System::Drawing::Point(90, 33); this->label15->Name = L"label15"; this->label15->Size = System::Drawing::Size(23, 12); this->label15->TabIndex = 24; this->label15->Text = L"Gpa"; // // label17 // this->label17->AutoSize = true; this->label17->Location = System::Drawing::Point(90, 62); this->label17->Name = L"label17"; this->label17->Size = System::Drawing::Size(23, 12); this->label17->TabIndex = 25; this->label17->Text = L"Gpa";
  • 打赏
  • 举报
回复
this->label1->Text = L"项目编号"; // // textBox1 // this->textBox1->Location = System::Drawing::Point(80, 9); this->textBox1->Name = L"textBox1"; this->textBox1->Size = System::Drawing::Size(100, 21); this->textBox1->TabIndex = 1; // // textBox2 // this->textBox2->Location = System::Drawing::Point(244, 9); this->textBox2->Name = L"textBox2"; this->textBox2->Size = System::Drawing::Size(100, 21); this->textBox2->TabIndex = 3; // // label2 // this->label2->AutoSize = true; this->label2->Location = System::Drawing::Point(186, 13); this->label2->Name = L"label2"; this->label2->Size = System::Drawing::Size(53, 12); this->label2->TabIndex = 2; this->label2->Text = L"负责单位"; // // textBox3 // this->textBox3->Location = System::Drawing::Point(396, 9); this->textBox3->Name = L"textBox3"; this->textBox3->Size = System::Drawing::Size(58, 21); this->textBox3->TabIndex = 5; // // label3 // this->label3->AutoSize = true; this->label3->Location = System::Drawing::Point(350, 13); this->label3->Name = L"label3"; this->label3->Size = System::Drawing::Size(41, 12); this->label3->TabIndex = 4; this->label3->Text = L"负责人"; // // textBox4 // this->textBox4->Location = System::Drawing::Point(518, 8); this->textBox4->Name = L"textBox4"; this->textBox4->Size = System::Drawing::Size(100, 21); this->textBox4->TabIndex = 7; // // label4 // this->label4->AutoSize = true; this->label4->Location = System::Drawing::Point(460, 12); this->label4->Name = L"label4"; this->label4->Size = System::Drawing::Size(53, 12); this->label4->TabIndex = 6; this->label4->Text = L"项目时间"; // // groupBox1 // this->groupBox1->Controls->Add(this->button6); this->groupBox1->Controls->Add(this->button5); this->groupBox1->Controls->Add(this->button2); this->groupBox1->Controls->Add(this->label10); this->groupBox1->Controls->Add(this->button1); this->groupBox1->Controls->Add(this->groupBox2); this->groupBox1->Controls->Add(this->comboBox3); this->groupBox1->Controls->Add(this->label9); this->groupBox1->Controls->Add(this->comboBox2); this->groupBox1->Controls->Add(this->textBox7); this->groupBox1->Controls->Add(this->label8); this->groupBox1->Controls->Add(this->textBox6); this->groupBox1->Controls->Add(this->label7); this->groupBox1->Controls->Add(this->textBox5); this->groupBox1->Controls->Add(this->label5); this->groupBox1->Controls->Add(this->label6); this->groupBox1->Controls->Add(this->comboBox1); this->groupBox1->Controls->Add(this->pictureBox1); this->groupBox1->Location = System::Drawing::Point(24, 88); this->groupBox1->Name = L"groupBox1"; this->groupBox1->Size = System::Drawing::Size(352, 411); this->groupBox1->TabIndex = 8; this->groupBox1->TabStop = false; this->groupBox1->Text = L"工程常数预测"; // // comboBox1 // this->comboBox1->FormattingEnabled = true; this->comboBox1->Items->AddRange(gcnew cli::array< System::Object^ >(2) {L"传统RVE", L"褶皱纤维RVE"}); this->comboBox1->Location = System::Drawing::Point(81, 24); this->comboBox1->Name = L"comboBox1"; this->comboBox1->Size = System::Drawing::Size(86, 20); this->comboBox1->TabIndex = 0; this->comboBox1->Text = L"褶皱纤维RVE"; // // label5 // this->label5->AutoSize = true; this->label5->Location = System::Drawing::Point(11, 27); this->label5->Name = L"label5"; this->label5->Size = System::Drawing::Size(65, 12); this->label5->TabIndex = 9; this->label5->Text = L"测试件类型"; // // textBox5 // this->textBox5->Location = System::Drawing::Point(94, 90); this->textBox5->Name = L"textBox5"; this->textBox5->Size = System::Drawing::Size(47, 21); this->textBox5->TabIndex = 10; // // label6 // this->label6->AutoSize = true; this->label6->Location = System::Drawing::Point(11, 94); this->label6->Name = L"label6"; this->label6->Size = System::Drawing::Size(77, 12); this->label6->TabIndex = 9; this->label6->Text = L"褶皱角均方差"; // // textBox6 // this->textBox6->Location = System::Drawing::Point(231, 90); this->textBox6->Name = L"textBox6"; this->textBox6->Size = System::Drawing::Size(47, 21); this->textBox6->TabIndex = 12; // // label7 // this->label7->AutoSize = true; this->label7->Location = System::Drawing::Point(162, 94); this->label7->Name = L"label7"; this->label7->Size = System::Drawing::Size(65, 12); this->label7->TabIndex = 11; this->label7->Text = L"褶皱角均值"; // // pictureBox1 // this->pictureBox1->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"pictureBox1.Image"))); this->pictureBox1->Location = System::Drawing::Point(5, 169); this->pictureBox1->Name = L"pictureBox1"; this->pictureBox1->Size = System::Drawing::Size(187, 156); this->pictureBox1->TabIndex = 13; this->pictureBox1->TabStop = false; // // textBox7 // this->textBox7->Location = System::Drawing::Point(284, 23); this->textBox7->Name = L"textBox7"; this->textBox7->Size = System::Drawing::Size(47, 21); this->textBox7->TabIndex = 15; // // label8 // this->label8->AutoSize = true; this->label8->Location = System::Drawing::Point(201, 27); this->label8->Name = L"label8"; this->label8->Size = System::Drawing::Size(77, 12); this->label8->TabIndex = 14; this->label8->Text = L"纤维体积分数"; // // label9 // this->label9->AutoSize = true; this->label9->Location = System::Drawing::Point(11, 61); this->label9->Name = L"label9"; this->label9->Size = System::Drawing::Size(53, 12); this->label9->TabIndex = 17; this->label9->Text = L"纤维牌号"; // // comboBox2 // this->comboBox2->FormattingEnabled = true; this->comboBox2->Items->AddRange(gcnew cli::array< System::Object^ >(2) {L"传统RVE", L"褶皱纤维RVE"}); this->comboBox2->Location = System::Drawing::Point(70, 58); this->comboBox2->Name = L"comboBox2"; this->comboBox2->Size = System::Drawing::Size(53, 20); this->comboBox2->TabIndex = 16; this->comboBox2->Text = L"T300"; // // label10 // this->label10->AutoSize = true; this->label10->Location = System::Drawing::Point(155, 61); this->label10->Name = L"label10"; this->label10->Size = System::Drawing::Size(53, 12); this->label10->TabIndex = 19; this->label10->Text = L"基体牌号"; // // comboBox3 // this->comboBox3->FormattingEnabled = true; this->comboBox3->Items->AddRange(gcnew cli::array< System::Object^ >(2) {L"传统RVE", L"褶皱纤维RVE"}); this->comboBox3->Location = System::Drawing::Point(214, 58); this->comboBox3->Name = L"comboBox3"; this->comboBox3->Size = System::Drawing::Size(53, 20); this->comboBox3->TabIndex = 18; this->comboBox3->Text = L"914C"; // // label13 // this->label13->AutoSize = true; this->label13->Location = System::Drawing::Point(14, 33); this->label13->Name = L"label13"; this->label13->Size = System::Drawing::Size(17, 12); this->label13->TabIndex = 14; this->label13->Text = L"E1"; // // textBox8 // this->textBox8->Location = System::Drawing::Point(37, 30); this->textBox8->Name = L"textBox8"; this->textBox8->Size = System::Drawing::Size(47, 21); this->textBox8->TabIndex = 15; // // groupBox2 // this->groupBox2->Controls->Add(this->label18); this->groupBox2->Controls->Add(this->label17); this->groupBox2->Controls->Add(this->label15); this->groupBox2->Controls->Add(this->textBox13); this->groupBox2->Controls->Add(this->label16); this->groupBox2->Controls->Add(this->textBox11); this->groupBox2->Controls->Add(this->label14); this->groupBox2->Controls->Add(this->textBox10); this->groupBox2->Controls->Add(this->label12); this->groupBox2->Controls->Add(this->textBox9); this->groupBox2->Controls->Add(this->label11); this->groupBox2->Controls->Add(this->textBox8); this->groupBox2->Controls->Add(this->label13); this->groupBox2->Location = System::Drawing::Point(214, 169); this->groupBox2->Name = L"groupBox2"; this->groupBox2->Size = System::Drawing::Size(128, 197); this->groupBox2->TabIndex = 20; this->groupBox2->TabStop = false; this->groupBox2->Text = L"工程常数预测结果"; // // textBox9 // this->textBox9->Location = System::Drawing::Point(37, 59); this->textBox9->Name = L"textBox9"; this->textBox9->Size = System::Drawing::Size(47, 21); this->textBox9->TabIndex = 17; // // label11 // this->label11->AutoSize = true; this->label11->Location = System::Drawing::Point(14, 62); this->label11->Name = L"label11"; this->label11->Size = System::Drawing::Size(17, 12); this->label11->TabIndex = 16; this->label11->Text = L"E2"; // // textBox10 // this->textBox10->Location = System::Drawing::Point(37, 135); this->textBox10->Name = L"textBox10"; this->textBox10->Size = System::Drawing::Size(47, 21); this->textBox10->TabIndex = 19; // // label12 // this->label12->AutoSize = true; this->label12->Location = System::Drawing::Point(14, 138); this->label12->Name = L"label12"; this->label12->Size = System::Drawing::Size(23, 12); this->label12->TabIndex = 18; this->label12->Text = L"v12"; RT······就是上面两个文件,运行总是不成功···求指点······
  • 打赏
  • 举报
回复
发不下了接楼上 void InitializeComponent(void) { System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(Form1::typeid)); this->label1 = (gcnew System::Windows::Forms::Label()); this->textBox1 = (gcnew System::Windows::Forms::TextBox()); this->textBox2 = (gcnew System::Windows::Forms::TextBox()); this->label2 = (gcnew System::Windows::Forms::Label()); this->textBox3 = (gcnew System::Windows::Forms::TextBox()); this->label3 = (gcnew System::Windows::Forms::Label()); this->textBox4 = (gcnew System::Windows::Forms::TextBox()); this->label4 = (gcnew System::Windows::Forms::Label()); this->groupBox1 = (gcnew System::Windows::Forms::GroupBox()); this->comboBox1 = (gcnew System::Windows::Forms::ComboBox()); this->label5 = (gcnew System::Windows::Forms::Label()); this->textBox5 = (gcnew System::Windows::Forms::TextBox()); this->label6 = (gcnew System::Windows::Forms::Label()); this->textBox6 = (gcnew System::Windows::Forms::TextBox()); this->label7 = (gcnew System::Windows::Forms::Label()); this->pictureBox1 = (gcnew System::Windows::Forms::PictureBox()); this->textBox7 = (gcnew System::Windows::Forms::TextBox()); this->label8 = (gcnew System::Windows::Forms::Label()); this->label9 = (gcnew System::Windows::Forms::Label()); this->comboBox2 = (gcnew System::Windows::Forms::ComboBox()); this->label10 = (gcnew System::Windows::Forms::Label()); this->comboBox3 = (gcnew System::Windows::Forms::ComboBox()); this->label13 = (gcnew System::Windows::Forms::Label()); this->textBox8 = (gcnew System::Windows::Forms::TextBox()); this->groupBox2 = (gcnew System::Windows::Forms::GroupBox()); this->textBox9 = (gcnew System::Windows::Forms::TextBox()); this->label11 = (gcnew System::Windows::Forms::Label()); this->textBox10 = (gcnew System::Windows::Forms::TextBox()); this->label12 = (gcnew System::Windows::Forms::Label()); this->textBox11 = (gcnew System::Windows::Forms::TextBox()); this->label14 = (gcnew System::Windows::Forms::Label()); this->textBox13 = (gcnew System::Windows::Forms::TextBox()); this->label16 = (gcnew System::Windows::Forms::Label()); this->label15 = (gcnew System::Windows::Forms::Label()); this->label17 = (gcnew System::Windows::Forms::Label()); this->label18 = (gcnew System::Windows::Forms::Label()); this->button1 = (gcnew System::Windows::Forms::Button()); this->button2 = (gcnew System::Windows::Forms::Button()); this->groupBox3 = (gcnew System::Windows::Forms::GroupBox()); this->label20 = (gcnew System::Windows::Forms::Label()); this->comboBox5 = (gcnew System::Windows::Forms::ComboBox()); this->textBox12 = (gcnew System::Windows::Forms::TextBox()); this->label21 = (gcnew System::Windows::Forms::Label()); this->label23 = (gcnew System::Windows::Forms::Label()); this->comboBox6 = (gcnew System::Windows::Forms::ComboBox()); this->pictureBox2 = (gcnew System::Windows::Forms::PictureBox()); this->groupBox4 = (gcnew System::Windows::Forms::GroupBox()); this->label19 = (gcnew System::Windows::Forms::Label()); this->textBox14 = (gcnew System::Windows::Forms::TextBox()); this->label22 = (gcnew System::Windows::Forms::Label()); this->label24 = (gcnew System::Windows::Forms::Label()); this->textBox15 = (gcnew System::Windows::Forms::TextBox()); this->label25 = (gcnew System::Windows::Forms::Label()); this->label26 = (gcnew System::Windows::Forms::Label()); this->textBox16 = (gcnew System::Windows::Forms::TextBox()); this->label27 = (gcnew System::Windows::Forms::Label()); this->label28 = (gcnew System::Windows::Forms::Label()); this->textBox17 = (gcnew System::Windows::Forms::TextBox()); this->label29 = (gcnew System::Windows::Forms::Label()); this->button3 = (gcnew System::Windows::Forms::Button()); this->button4 = (gcnew System::Windows::Forms::Button()); this->button5 = (gcnew System::Windows::Forms::Button()); this->button6 = (gcnew System::Windows::Forms::Button()); this->button7 = (gcnew System::Windows::Forms::Button()); this->textBox18 = (gcnew System::Windows::Forms::TextBox()); this->button8 = (gcnew System::Windows::Forms::Button()); this->button9 = (gcnew System::Windows::Forms::Button()); this->button10 = (gcnew System::Windows::Forms::Button()); this->groupBox1->SuspendLayout(); (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox1))->BeginInit(); this->groupBox2->SuspendLayout(); this->groupBox3->SuspendLayout(); (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox2))->BeginInit(); this->groupBox4->SuspendLayout(); this->SuspendLayout(); // // label1 // this->label1->AutoSize = true; this->label1->Location = System::Drawing::Point(22, 13); this->label1->Name = L"label1"; this->label1->Size = System::Drawing::Size(53, 12); this->label1->TabIndex = 0;

1,979

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 其他语言讨论
社区管理员
  • 其他语言社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧