With the great help in the previous posts, I want to thank all of them!
This is quite a long post and I hope it does not bore you
After I write and the function in the previous posts, now I use them in the GUI Interface but I think GUI is my weakest part....
First,I create 2 forms.
Form 1 is let the user input the name and select whether create a new account or use the old account.
The header file of Form 1 is :
#pragma once
#include "Form2.h"
#include <fstream>
namespace login_GUI {
using namespace System;
.....
using namespace System::Runtime::InteropServices; //For the class Marshal
/// <summary>
/// Summary for Form1
/// </summary>
public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
void read();
void write();
void find();
void setuser();
}
...
...
private:
/// <summary>
/// Required designer variable.
/// </summary>
System::ComponentModel::Container ^components;
void read() {}
void write(){}
void find(){}
void setuser(){}
...
...
#pragma endregion
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) // The create new user bottom
{
Form2 ^F2= gcnew Form2();
F2->ShowDialog();
}
private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) // The login as old botton
{
Form2 ^F2= gcnew Form2();
F2->ShowDialog();
}
};
}
Form 2 is show the user input and the buttom to close the form.
The header file of Form 2 is :
#pragma once
namespace login_GUI {
using namespace System;
...
...
...
#pragma endregion
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) // the close button
{
this->Close();
}
};
My problem is I have no idea to use my written function applied in the GUI.....
This is quite a long post and I hope it does not bore you
After I write and the function in the previous posts, now I use them in the GUI Interface but I think GUI is my weakest part....
First,I create 2 forms.
Form 1 is let the user input the name and select whether create a new account or use the old account.
The header file of Form 1 is :
#pragma once
#include "Form2.h"
#include <fstream>
namespace login_GUI {
using namespace System;
.....
using namespace System::Runtime::InteropServices; //For the class Marshal
/// <summary>
/// Summary for Form1
/// </summary>
public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
void read();
void write();
void find();
void setuser();
}
...
...
private:
/// <summary>
/// Required designer variable.
/// </summary>
System::ComponentModel::Container ^components;
void read() {}
void write(){}
void find(){}
void setuser(){}
...
...
#pragma endregion
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) // The create new user bottom
{
Form2 ^F2= gcnew Form2();
F2->ShowDialog();
}
private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) // The login as old botton
{
Form2 ^F2= gcnew Form2();
F2->ShowDialog();
}
};
}
Form 2 is show the user input and the buttom to close the form.
The header file of Form 2 is :
#pragma once
namespace login_GUI {
using namespace System;
...
...
...
#pragma endregion
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) // the close button
{
this->Close();
}
};
My problem is I have no idea to use my written function applied in the GUI.....