-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUnit2.cpp
More file actions
46 lines (39 loc) · 1.22 KB
/
Unit2.cpp
File metadata and controls
46 lines (39 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit2.h"
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm2 *Form2;
//---------------------------------------------------------------------------
__fastcall TForm2::TForm2(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button1Click(TObject *Sender) // È®ÀÎ
{
Memo1->Lines->LoadFromFile("lock.txt") ;
AnsiString a=Memo1->Text ;
Memo1->Clear() ;
if(a==Edit1->Text)
{
Form1->Timer1->Enabled=false ;
ShellExecute(NULL,"open","F:\\",NULL,NULL,SW_SHOWNORMAL) ;
Form2->Close() ;
}
else
{
MessageBeep(0) ;
ShowMessage("¾ÏÈ£°¡ Ʋ¸³´Ï´Ù.") ;
Edit1->Clear() ;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button2Click(TObject *Sender)
{
Form2->Close() ;
}
//---------------------------------------------------------------------------