Hi Navaneeth, I am writing here code of form1 and form2.
form1.h
#pragma once
#include "AboutApp.h"
#include "LoginForm.h"
#using <mscorlib.dll>
//#pragma comment( lib, "user32.lib" )
namespace NewMDIApp {
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::Runtime::InteropServices;
/// <summary>
/// Summary for Form1
///
/// WARNING: If you change the name of this class, you will need to change the
/// 'Resource File Name' property for the managed resource compiler tool
/// associated with all .resx files this class depends on. Otherwise,
/// the designers will not be able to interact properly with localized
/// resources associated with this form.
/// </summary>
public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
protected:
#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)
{
// Form1
//
this->AccessibleRole = System::Windows::Forms::AccessibleRole::MenuBar;
this->AllowDrop = true;
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->BackgroundImage = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"$this.BackgroundImage")));
this->BackgroundImageLayout = System::Windows::Forms::ImageLayout::Stretch;
this->ClientSize = System::Drawing::Size(1017, 700);
this->Controls->Add(this->statusBar1);
this->Controls->Add(this->statusStrip1);
}
#pragma endregion
public:
[DllImport("user32.dll",EntryPoint="GetKeyState")]
//static int GetKeyState (int keycode);
static int GetKeyState(int keyCode);
[DllImport("user32.dll",EntryPoint="keybd_event")]
static void keybd_event(Byte bVk, Byte bScan, UInt16 dwFlags, int dwExtraInfo);
//[import("user32.dll", ExactSpelling=true)];
//public: System::short GetKeyState(int keyCode);
public: static LoginForm^ lgFrm=gcnew LoginForm;
private: System::Void