처음으로 델파이에 갔을 때, 나는 꽤 기분이 좋았지 만 영어는 너무 나빴고 많은 컨트롤을 인식하지 못했습니다.
처음 컴퓨터로 가기 시작했을 때 양식의 배경색을 변경할 수있는 임의의 프로그램을 작성했습니다.
단위 유닛 1;
인터페이스
용도
창, 메시지, 시스템, 변형, 클래스, 그래픽, 컨트롤, 양식,
대화, stdctrls;
유형
tform1 = 클래스 (tform)
버튼 1 : tbutton;
버튼 2 : tbutton;
버튼 4 : tbutton;
버튼 5 : tbutton;
버튼 6 : tbutton;
버튼 3 : tbutton;
절차 버튼 1Click (sender : tobject);
절차 button2click (sender : tobject);
절차 버튼 4Click (sender : tobject);
절차 버튼 5Click (sender : tobject);
프로 시저 Button6Click (sender : tobject);
절차 버튼 3Click (sender : tobject);
사적인
{개인 선언}
공공의
{공개 선언}
끝;
var
form1 : tform1;
구현
{$ r *.dfm}
절차 tform1.Button1click (sender : tobject);
시작하다
form1.caption : = '빨간색 배경';
form1.color : = clred // 양식의 색상이 변경됩니다
끝;
절차 tform1.Button2Click (sender : tobject);
시작하다
form1.caption : = '흰색 배경';
form1.color : = clwhite
끝;
절차 tform1.Button4Click (sender : tobject);
시작하다
form1.caption : = '파란색 배경';
form1.color : = clblue
끝;
절차 tform1.Button5Click (sender : tobject);
시작하다
form1.caption : = '노란색 배경';
form1.color : = Clyellow
끝;
절차 tform1.Button6Click (sender : tobject);
시작하다
form1.caption : = '녹색 배경';
form1.color : = clgreen
끝;
절차 tform1.Button3Click (sender : tobject);
시작하다
form1.close
끝;
끝.
나는 처음으로 작은 코드를 작성하게되어 매우 기뻤습니다.