Visual c++ 表格2不开放? 我用微软Visual C++制作了一个视频游戏,我用CLR语言编码所有这些,但是我这个奇怪的问题……

Visual c++ 表格2不开放? 我用微软Visual C++制作了一个视频游戏,我用CLR语言编码所有这些,但是我这个奇怪的问题……,visual-c++,c++-cli,Visual C++,C++ Cli,出于某种原因,每当我尝试用表格1打开表格2时,我得到的都是这些错误 *1>------ Build started: Project: Retaliation, Configuration: Debug Win32 ------ 1> Form2.cpp 1>c:\users\devon\documents\visual studio 2010\projects\retaliation\retaliation\Form1.h(431): error C

出于某种原因,每当我尝试用表格1打开表格2时,我得到的都是这些错误

  *1>------ Build started: Project: Retaliation, Configuration: Debug Win32 ------
  1>  Form2.cpp
  1>c:\users\devon\documents\visual studio       2010\projects\retaliation\retaliation\Form1.h(431): error C2065: 'Form2' : undeclared       identifier
  1>c:\users\devon\documents\visual studio       2010\projects\retaliation\retaliation\Form1.h(431): error C2065: 'f2' : undeclared       identifier
  1>c:\users\devon\documents\visual studio 2010\projects\retaliation\retaliation\Form1.h(431): error C2061: syntax error : identifier 'Form2'
  1>c:\users\devon\documents\visual studio 2010\projects\retaliation\retaliation\Form1.h(432): error C2065: 'f2' : undeclared identifier
  1>c:\users\devon\documents\visual studio       2010\projects\retaliation\retaliation\Form1.h(432): error C2227: left of '->Show' must       point to class/struct/union/generic type
  1>          type is ''unknown-type''
  1>  Retaliation.cpp
  1>  Generating Code...
  ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========*
这是我的表格1代码

   #pragma once
   #include "stdAfx.h"
   #include "Form2.h"
   #include "Form1.h"

   namespace Retaliation {

using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
using namespace System::IO;
using namespace std;
/// <summary>
/// Summary for Form1
/// </summary>
public ref class Form1 : public System::Windows::Forms::Form
{
public:
    String^ CharName;
    String^ Race;
    String^ Gender;
    String^ Specialty;
    String^ Friend;
    int YesorNo;
    int ExitChoice;
    int TimerValue;
int MonsterN;
int EnemyHp;
int Dm;
int Energy;
int Action;
int Rage;
int MaxMana;
int MaxRage;
int MaxEnergy;
int Save;
// 1 = Earth pony 2 = Pegasus 3 = unicorn
int Lv;
int XpR;
     int Xp;
int A;
int D;
int Hp;
int MaxHp;
int Magic;
int Mana;
int Agility;
int Gold;
String ^Enpowerment;
// 1 = Friendship is Magic, 2 = Music is Magic, 3 = Darkness is Magic, 4 = Light is     Magic, 5 = Chaos is Magic
// End of leveling thread
int Checkpoint;
int FriendNameN;
int SavePoint;
int MenuChoice;
int RightMenuChoice;
int RestartFile;
int Answer;
int EnemyA;
int EnemyD;
int EnemyLv;
int EnemyMana;
int EnemyMagic;
int EnemyAgility;
int Random;
String ^ EName;
int Damage;
int Survivors;
int SavedSurvivors;
private: System::Windows::Forms::TextBox^  textBox1;
private: System::Windows::Forms::Timer^  timer1;
public: 
    int MainActions;


    Form1(void)
    {
        InitializeComponent();
        //
        //TODO: Add the constructor code here
        //

    }

protected:
    /// <summary>
    /// Clean up any resources being used.
    /// </summary>
    ~Form1()
    {
        if (components)
        {
            delete components;
        }
    }
private: System::Windows::Forms::PictureBox^  pictureBox1;
protected: 
private: System::Windows::Forms::Button^  button1;
private: System::Windows::Forms::Button^  button2;
private: System::Windows::Forms::Button^  button3;
private: System::Windows::Forms::PictureBox^  pictureBox2;
private: System::Windows::Forms::Label^  label1;



private: System::Windows::Forms::Label^  label2;


private: System::Windows::Forms::Button^  button4;
private: System::Windows::Forms::Button^  button5;
private: System::Windows::Forms::PictureBox^  pictureBox3;
private: System::ComponentModel::IContainer^  components;

private:
    /// <summary>
    /// Required designer variable.
    /// </summary>


      #pragma region Windows Form Designer generated code
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    void InitializeComponent(void)
    {
        this->components = (gcnew System::ComponentModel::Container());
        System::ComponentModel::ComponentResourceManager^  resources =   (gcnew System::ComponentModel::ComponentResourceManager(Form1::typeid));
        this->pictureBox1 = (gcnew System::Windows::Forms::PictureBox());
        this->button1 = (gcnew System::Windows::Forms::Button());
        this->button2 = (gcnew System::Windows::Forms::Button());
        this->button3 = (gcnew System::Windows::Forms::Button());
        this->pictureBox2 = (gcnew System::Windows::Forms::PictureBox());
        this->label1 = (gcnew System::Windows::Forms::Label());
        this->label2 = (gcnew System::Windows::Forms::Label());
        this->button4 = (gcnew System::Windows::Forms::Button());
        this->button5 = (gcnew System::Windows::Forms::Button());
        this->pictureBox3 = (gcnew System::Windows::Forms::PictureBox());
        this->textBox1 = (gcnew System::Windows::Forms::TextBox());
        this->timer1 = (gcnew System::Windows::Forms::Timer(this- >components));
        (cli::safe_cast<System::ComponentModel::ISupportInitialize^  > (this->pictureBox1))->BeginInit();
        (cli::safe_cast<System::ComponentModel::ISupportInitialize^  > (this->pictureBox2))->BeginInit();
        (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox3))->BeginInit();
        this->SuspendLayout();
        // 
        // pictureBox1
        // 
        this->pictureBox1->Image = (cli::safe_cast<System::Drawing::Image^   >(resources->GetObject(L"pictureBox1.Image")));
        this->pictureBox1->Location = System::Drawing::Point(0, -3);
        this->pictureBox1->Name = L"pictureBox1";
        this->pictureBox1->Size = System::Drawing::Size(600, 295);
        this->pictureBox1->TabIndex = 0;
        this->pictureBox1->TabStop = false;
        // 
        // button1
        // 
        this->button1->Location = System::Drawing::Point(13, 230);
        this->button1->Name = L"button1";
        this->button1->Size = System::Drawing::Size(127, 43);
        this->button1->TabIndex = 1;
        this->button1->Text = L"Start Game";
        this->button1->UseVisualStyleBackColor = true;
        this->button1->Click += gcnew System::EventHandler(this,   &Form1::button1_Click);
        // 
        // button2
        // 
        this->button2->Location = System::Drawing::Point(313, 212);
        this->button2->Name = L"button2";
        this->button2->Size = System::Drawing::Size(120, 42);
        this->button2->TabIndex = 2;
        this->button2->Text = L"New Game";
        this->button2->UseVisualStyleBackColor = true;
        this->button2->Visible = false;
        this->button2->Click += gcnew System::EventHandler(this, &Form1::button2_Click);
        // 
        // button3
        // 
        this->button3->Location = System::Drawing::Point(143, 212);
        this->button3->Name = L"button3";
        this->button3->Size = System::Drawing::Size(120, 42);
        this->button3->TabIndex = 3;
        this->button3->Text = L"Load Game";
        this->button3->UseVisualStyleBackColor = true;
        this->button3->Visible = false;
        this->button3->Click += gcnew System::EventHandler(this, &Form1::button3_Click);
        // 
        // pictureBox2
        // 
        this->pictureBox2->BackColor = System::Drawing::Color::Transparent;
        this->pictureBox2->BackgroundImage =  (cli::safe_cast<System::Drawing::Image^  >(resources- >GetObject(L"pictureBox2.BackgroundImage")));
        this->pictureBox2->Location = System::Drawing::Point(0, -3);
        this->pictureBox2->Name = L"pictureBox2";
        this->pictureBox2->Size = System::Drawing::Size(86, 81);
        this->pictureBox2->TabIndex = 4;
        this->pictureBox2->TabStop = false;
        this->pictureBox2->Visible = false;
        // 
        // label1
        // 
        this->label1->AutoSize = true;
        this->label1->BackColor = System::Drawing::Color::Transparent;
        this->label1->Location = System::Drawing::Point(92, -3);
        this->label1->Name = L"label1";
        this->label1->Size = System::Drawing::Size(22, 13);
        this->label1->TabIndex = 5;
        this->label1->Text = L"     ";
        this->label1->Visible = false;
        // 
        // label2
        // 
        this->label2->BackColor = System::Drawing::Color::Transparent;
        this->label2->Location = System::Drawing::Point(358, 87);
        this->label2->Name = L"label2";
        this->label2->Size = System::Drawing::Size(199, 98);
        this->label2->TabIndex = 9;
        this->label2->Text = L"None";
        this->label2->Visible = false;
        // 
        // button4
        // 
        this->button4->Location = System::Drawing::Point(463, 13);
        this->button4->Name = L"button4";
        this->button4->Size = System::Drawing::Size(75, 23);
        this->button4->TabIndex = 12;
        this->button4->Text = L"Yes";
        this->button4->UseVisualStyleBackColor = true;
        this->button4->Visible = false;
        this->button4->Click += gcnew System::EventHandler(this, &Form1::button4_Click);
        // 
        // button5
        // 
        this->button5->Location = System::Drawing::Point(463, 43);
        this->button5->Name = L"button5";
        this->button5->Size = System::Drawing::Size(75, 23);
        this->button5->TabIndex = 13;
        this->button5->Text = L"No";
        this->button5->UseVisualStyleBackColor = true;
        this->button5->Visible = false;
        this->button5->Click += gcnew System::EventHandler(this, &Form1::button5_Click);
        // 
        // pictureBox3
        // 
        this->pictureBox3->BackColor = System::Drawing::Color::Transparent;
        this->pictureBox3->Location = System::Drawing::Point(13, 84);
        this->pictureBox3->Name = L"pictureBox3";
        this->pictureBox3->Size = System::Drawing::Size(165, 208);
        this->pictureBox3->TabIndex = 14;
        this->pictureBox3->TabStop = false;
        this->pictureBox3->Visible = false;
        // 
        // textBox1
        // 
        this->textBox1->Location = System::Drawing::Point(463, 212);
        this->textBox1->Name = L"textBox1";
        this->textBox1->Size = System::Drawing::Size(100, 20);
        this->textBox1->TabIndex = 15;
        this->textBox1->Visible = false;
        this->textBox1->TextChanged += gcnew System::EventHandler(this, &Form1::textBox1_TextChanged_1);
        // 
        // timer1
        // 
        this->timer1->Interval = 1000;
        this->timer1->Tick += gcnew System::EventHandler(this, &Form1::timer1_Tick);
        // 
        // Form1
        // 
        this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
        this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
        this->ClientSize = System::Drawing::Size(598, 285);
        this->Controls->Add(this->textBox1);
        this->Controls->Add(this->pictureBox3);
        this->Controls->Add(this->button5);
        this->Controls->Add(this->button4);
        this->Controls->Add(this->label2);
        this->Controls->Add(this->label1);
        this->Controls->Add(this->pictureBox2);
        this->Controls->Add(this->button3);
        this->Controls->Add(this->button2);
        this->Controls->Add(this->button1);
        this->Controls->Add(this->pictureBox1);
        this->Name = L"Form1";
        this->Text = L"Retaliation";
        (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox1))->EndInit();
        (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox2))->EndInit();
        (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->pictureBox3))->EndInit();
        this->ResumeLayout(false);
        this->PerformLayout();

    }
    #pragma endregion
    public:int MoviePlay;
private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
             //
             this -> button2 -> Visible = true;
             this -> button3 -> Visible = true;
             this -> button1 -> Visible = false;
             this -> pictureBox1 -> Load("Derpy.jpg");
             //
         }
       private: System::Void button2_Click(System::Object^  sender, System::EventArgs^  e) {
         if (YesorNo == 0){
             this -> button4 -> Visible = true;
         this -> button2 -> Visible = false;
         this -> button5 -> Visible = true;
         this -> button3 -> Visible = false;
         this -> label2 -> Visible = true;
         this -> label2 -> Text = "Are you Sure?";
         this -> YesorNo = 1;
         }
         else if (YesorNo == 5)
         {
             Gender = "Female";
             this -> label2 -> Text = "What is your Race??"; 
             this -> button4 -> Text = "Earth Pony";
             this -> button5 -> Text = "Unicorn";
             this -> button2 -> Visible = true;
             this -> button2 -> Text = "Pegasus";
             YesorNo = 6;
         }
         else if (YesorNo == 6)
         {
             Race = "Pegasus";
             this -> button2 -> Visible = false;
             this -> button4 -> Visible = false;
             this -> button5 -> Visible = false;
             label2 -> Text = "Thank You For Playing!!";
             YesorNo = 7;
             this -> timer1 -> Start();
         }
     }
          private: System::Void textBox1_TextChanged(System::Object^  sender, System::EventArgs^  e) {

     }
      private: System::Void button4_Click(System::Object^  sender, System::EventArgs^  e) {
         if (YesorNo == 1)
         {
             this -> label2 -> Text = "To Make your Pony Character, See  PonyMakin.txt in your Retaliation Folder, Your pony should have a invisible background...  If not check your background color For your pony!";
             button4 -> Text = "Show Pony";
             YesorNo = 2;
         }
         else if ( YesorNo == 2)
         {             
             this -> pictureBox3 -> Visible = true;
             this -> pictureBox3 -> Load("Outline Body Model.jpg");
             this -> pictureBox2 -> Visible = true;
             this -> pictureBox2 -> Load("OutlineModel.jpg");
             YesorNo = 3;
             this -> textBox1 -> Visible = true;
             this -> textBox1 -> Text = "Name?";
             this -> button5 -> Visible = false;
             this -> button4 -> Visible = false;
             this -> label2 -> Visible = false;

         }
         else if (YesorNo == 5)
         {
             Gender = "Male";
             this -> label2 -> Text = "What is your Race??"; 
             this -> button4 -> Text = "Earth Pony";
             this -> button5 -> Text = "Unicorn";
             this -> button2 -> Visible = true;
             this -> button2 -> Text = "Pegasus";
             YesorNo = 6;
         }
         else if (YesorNo == 6)
         {
             Race = "Earth_Pony";
             this -> button2 -> Visible = false;
             this -> button4 -> Visible = false;
             this -> button5 -> Visible = false;
             label2 -> Text = "Thank You For Playing!!";
             YesorNo = 7;
             this -> timer1 -> Start();
         }
     }

      private: System::Void button5_Click(System::Object^  sender, System::EventArgs^  e) {
         if (YesorNo == 1 || YesorNo == 2)
         {
             Application::Exit();
         }
         else if (YesorNo == 4)
         {
             this -> textBox1 -> Visible = false;
             this -> label2 -> Visible = true;
             this -> label2 -> Text = "What Is Your Gender?";
             this -> button4 -> Text = "Male";
             this -> button5 -> Text = "Female";
             this -> button4 -> Visible = true;
             this -> button5 -> Visible = true;
             YesorNo = 5;
         }
         else if (YesorNo == 5)
         {
             Gender = "Female";
             this -> label2 -> Text = "What is your Race??"; 
             this -> button4 -> Text = "Earth Pony";
             this -> button5 -> Text = "Unicorn";
             this -> button2 -> Visible = true;
             this -> button2 -> Text = "Pegasus";
             YesorNo = 6;
         }
         else if (YesorNo == 6)
         {
             Race = "Unicorn";
             this -> button2 -> Visible = false;
             this -> button4 -> Visible = false;
             this -> button5 -> Visible = false;
             label2 -> Text = "Thank You For Playing!!";
             YesorNo = 7;
             this -> timer1 -> Start();
         }
     }
       private: System::Void button3_Click(System::Object^  sender, System::EventArgs^  e) {
           this -> button3 -> Text = "None yet";
     }
           private: System::Void textBox1_TextChanged_1(System::Object^  sender, System::EventArgs^  e) {
         this -> label1 -> Visible = true;
         CharName = textBox1 -> Text;
         label1 -> Text = CharName;
         this -> button5 -> Visible = true;
         this -> button5 -> Text = "Done?";
         YesorNo = 4;
     }
        private: System::Void timer1_Tick(System::Object^  sender, System::EventArgs^  e) {
         TimerValue+= 1000;
         if (TimerValue == 5000)
         {
             Form2 ^ f2 = gcnew Form2;
             f2->Show();
             this->Hide();
             MoviePlay = 1;
             StreamWriter^ outFile = gcnew StreamWriter("Movie.txt");
             String^ Movie = MoviePlay.ToString();
             outFile->Write(Movie);
             outFile->Close();
             this -> timer1 -> Stop();

         }
     }
  };
  }
#pragma一次
#包括“stdAfx.h”
#包括“表格2.h”
#包括“表格1.h”
名称空间报复{
使用名称空间系统;
使用名称空间System::ComponentModel;
使用名称空间系统::集合;
使用命名空间System::Windows::Forms;
使用名称空间System::Data;
使用名称空间系统::绘图;
使用名称空间系统::IO;
使用名称空间std;
/// 
///表格1摘要
/// 
public ref类Form1:public System::Windows::Forms::Form
{
公众:
字符串^CharName;
弦乐比赛;
字符串^性别;
弦乐专业;
字符串^朋友;
内耶索诺;
退出选择;
int TimerValue;
智力怪兽;
int-EnemyHp;
int-Dm;
国际能源;
内联作用;
内在愤怒;
int MaxMana;
int-MaxRage;
int最大能量;
整数保存;
//1=地球小马2=飞马3=独角兽
int-Lv;
int-XpR;
int-Xp;
INTA;
int D;
int-Hp;
int-MaxHp;
智力魔术;
智力法力;
智力敏捷;
国际黄金;
字符串^ENPOWENT;
//1=友谊是魔法,2=音乐是魔法,3=黑暗是魔法,4=光明是魔法,5=混沌是魔法
//调平螺纹端部
int检查点;
国际友名;
int保存点;
国际货币基金组织;
国际人权组织;
intrestartfile;
int答案;
内因灌肠;
内切;
int EnemyLv;
内特·恩米马纳;
内特灌肠魔术;
智力敏捷;
int随机;
字符串^EName;
智力损伤;
int幸存者;
int保存的生存者;
private:System::Windows::Forms::TextBox^textBox1;
私有:系统::Windows::窗体::计时器^timer1;
公众:
国际行动;
表格1(无效)
{
初始化组件();
//
//TODO:在此处添加构造函数代码
//
}
受保护的:
/// 
///清理所有正在使用的资源。
/// 
~Form1()
{
if(组件)
{
删除组件;
}
}
私有:系统::Windows::窗体::PictureBox^pictureBox1;
受保护的:
私有:系统::Windows::窗体::按钮^button1;
私有:系统::Windows::窗体::按钮^button2;
私有:系统::Windows::窗体::按钮^button3;
私有:系统::Windows::窗体::PictureBox^pictureBox2;
私有:系统::Windows::窗体::标签^label1;
私有:系统::Windows::窗体::标签^label2;
私有:系统::Windows::窗体::按钮^button4;
私有:系统::Windows::窗体::按钮^button5;
私有:系统::Windows::窗体::PictureBox^pictureBox3;
私有:系统::组件模型::IContainer^组件;
私人:
/// 
///必需的设计器变量。
/// 
#pragma区域Windows窗体设计器生成的代码
/// 
///设计器支持所需的方法-不修改
///此方法的内容与代码编辑器一起使用。
/// 
void初始化组件(void)
{
这->组件=(gcnewsystem::ComponentModel::Container());
System::ComponentModel::ComponentResourceManager^resources=(gcnew System::ComponentModel::ComponentResourceManager(Form1::typeid));
这->pictureBox1=(gcnew System::Windows::Forms::PictureBox());
此->按钮1=(gcnew System::Windows::Forms::Button());
此->按钮2=(gcnew System::Windows::Forms::Button());
此->按钮3=(gcnew System::Windows::Forms::Button());
这->pictureBox2=(gcnew System::Windows::Forms::PictureBox());
这->标签1=(gcnewsystem::Windows::Forms::Label());
这->label2=(gcnewsystem::Windows::Forms::Label());
此->按钮4=(gcnew System::Windows::Forms::Button());
此->按钮5=(gcnew System::Windows::Forms::Button());
这->pictureBox3=(gcnew System::Windows::Forms::PictureBox());
这->textBox1=(gcnewsystem::Windows::Forms::TextBox());
this->timer1=(gcnewsystem::Windows::Forms::Timer(this->components));
(cli::safe_cast(this->pictureBox1))->BeginInit();
(cli::safe_cast(this->pictureBox2))->BeginInit();
(cli::safe_cast(this->pictureBox3))->BeginInit();
此->SuspendLayout();
// 
//pictureBox1
// 
this->pictureBox1->Image=(cli::safe_cast(参考资料->获取对象(L“pictureBox1.Image”);
此->图片框X1->位置=系统::绘图::点(0,-3);
此->pictureBox1->Name=L“pictureBox1”;
这->图片box1->尺寸=系统::图纸::尺寸(600295);
此->pictureBox1->TabIndex=0;
此->pictureBox1->TabStop=false;
// 
//按钮1
// 
此->按钮1->位置=系统::图纸::点(13230);
此->按钮1->名称=L“按钮1”;
此->按钮1->尺寸=系统::图纸::尺寸(127,43);
此->按钮1->选项卡索引=1;
此->按钮1->Text=L“开始游戏”;
此->按钮1->UseVisualStyleBackColor=true;
此->按钮1->Click+=gcnewsystem::EventHandler(此,&Form1::按钮1\u Click);
// 
//按钮2
// 
此->按钮2->位置=系统::图纸::点(3131212);
此->按钮2->名称=L“按钮2”;
该->按钮2->尺寸=系统::图纸::尺寸(120,42);
此->按钮2->选项卡索引=2;
此->按钮2->文本=L“新游戏”;
此->按钮2->UseVisualStyleBackColor=true;
此->按钮2->可见=假;
此->按钮2->单击+=gcnew System::EventHandler(此,&Form1::按钮2\u单击);
// 
//按钮3
// 
此->按钮3->位置=系统::图纸::点(143212);
此->按钮3->名称=L“按钮3”;
该->按钮3->尺寸=系统::图纸::尺寸(120,42);
此->按钮3->选项卡索引=3;
此->按钮3->文本=L“加载游戏”;
此->按钮3->UseVisualStyleBackColor=true;
此->按钮3->可见=假;
此->按钮3->单击+=gcnew System::EventHandler(此,&表单
   #pragma once
   #include "stdAfx.h"
   #include "Form1.h"
   #include "Form2.h"
   namespace Retaliation {

using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
using namespace std;


/// <summary>
/// Summary for Form2
/// </summary>
public ref class Form2 : public System::Windows::Forms::Form
{
public:
    int MoviePlay;

    Form2(void)
    {
        InitializeComponent();
        //
        //TODO: Add the constructor code here
        //
    }

protected:
    /// <summary>
    /// Clean up any resources being used.
    /// </summary>
    ~Form2()
    {
        if (components)
        {
            delete components;
        }
    }
private: AxWMPLib::AxWindowsMediaPlayer^  MoviePlayer1;
protected: 

protected: 

private:
    /// <summary>
    /// Required designer variable.
    /// </summary>
    System::ComponentModel::Container ^components;

     #pragma region Windows Form Designer generated code
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    void InitializeComponent(void)
    {
        System::ComponentModel::ComponentResourceManager^  resources =  (gcnew System::ComponentModel::ComponentResourceManager(Form2::typeid));
        this->MoviePlayer1 = (gcnew AxWMPLib::AxWindowsMediaPlayer());
        (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->MoviePlayer1))->BeginInit();
        this->SuspendLayout();
        // 
        // MoviePlayer1
        // 
        this->MoviePlayer1->Enabled = true;
        this->MoviePlayer1->Location = System::Drawing::Point(0, 0);
        this->MoviePlayer1->Name = L"MoviePlayer1";
        this->MoviePlayer1->OcxState =  (cli::safe_cast<System::Windows::Forms::AxHost::State^  >(resources- >GetObject(L"MoviePlayer1.OcxState")));
        this->MoviePlayer1->Size = System::Drawing::Size(860, 497);
        this->MoviePlayer1->TabIndex = 0;
        this->MoviePlayer1->Enter += gcnew System::EventHandler(this,   &Form2::axWindowsMediaPlayer1_Enter);
        // 
        // Form2
        // 
        this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
        this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
        this->ClientSize = System::Drawing::Size(859, 495);
        this->Controls->Add(this->MoviePlayer1);
        this->Name = L"Form2";
        this->Text = L"Form2";
        this->Load += gcnew System::EventHandler(this, &Form2::Form2_Load);
        (cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->MoviePlayer1))->EndInit();
        this->ResumeLayout(false);

    }
    #pragma endregion
private: System::Void axWindowsMediaPlayer1_Enter(System::Object^  sender,                 System::EventArgs^  e) {
         }
private: System::Void Form2_Load(System::Object^  sender, System::EventArgs^  e) {
             if (MoviePlay == 1)
             {
                 MoviePlayer1->URL = "\\Scv183\\Scene1.mpeg";
             MoviePlayer1 -> Ctlcontrols -> play();
             }
         }
};
  }
Form2^ testDialog = gcnew Form2;
testDialog->ShowDialog (this);
delete testDialog;
#include "stdafx.h"
#include "Form1.h"
#include "stdafx.h"
#include "Form2.h"
#include "Form1.h"