GetCreateTime File


#pragma once

namespace My49 {
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;
///
/// 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.
///

public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
protected:
///
/// Clean up any resources being used.
///

~Form1()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::Label^ lblCreateTime;
protected:
private: System::Windows::Forms::Label^ lblPathFile;
private:
///
/// Required designer variable.
///

System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///

void InitializeComponent(void)
{
this->lblCreateTime = (gcnew System::Windows::Forms::Label());
this->lblPathFile = (gcnew System::Windows::Forms::Label());
this->SuspendLayout();
//
// lblCreateTime
//
this->lblCreateTime->AutoSize = true;
this->lblCreateTime->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast
(222)));
this->lblCreateTime->ForeColor = System::Drawing::Color::White;
this->lblCreateTime->Location = System::Drawing::Point(12, 41);
this->lblCreateTime->Name = L"lblCreateTime";
this->lblCreateTime->Size = System::Drawing::Size(97, 16);
this->lblCreateTime->TabIndex = 0;
this->lblCreateTime->Text = L"CreateTime :";
//
// lblPathFile
//
this->lblPathFile->AutoSize = true;
this->lblPathFile->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast
(222)));
this->lblPathFile->ForeColor = System::Drawing::Color::White;
this->lblPathFile->Location = System::Drawing::Point(12, 9);
this->lblPathFile->Name = L"lblPathFile";
this->lblPathFile->Size = System::Drawing::Size(77, 16);
this->lblPathFile->TabIndex = 1;
this->lblPathFile->Text = L"Path File :";
//
// Form1
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(553, 64);
this->Controls->Add(this->lblPathFile);
this->Controls->Add(this->lblCreateTime);
this->Name = L"Form1";
this->Text = L"Form1";
this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion
//GetCreateTime File
private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {
lblCreateTime->Text="Create Time : "+File::GetCreationTime("C:\\Flower.BMP").ToString();
lblPathFile->Text="Path File : C:\\Flower.BMP";
this->Text="GetCreateTime File";
this->BackColor=Color::RosyBrown;
this->MaximizeBox=false;
}
};
}