Delphi Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
델파이 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
FreePascal/Lazarus
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
델마당
볼랜드포럼 광고 모집

델파이 Q&A
Delphi Programming Q&A
[580] [정보] 여러폼 사용하기...
vcl [ ] 2110 읽음    1998-01-08 03:34
unit Unit2;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, Buttons;

type
  TForm2 = class(TForm)
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    BitBtn3: TBitBtn;
    Label1: TLabel;
    Edit1: TEdit;
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;

function ShowForm1(sCap : String) : Integer;
function ShowForm2(var sCap : String) : Integer;

implementation

{$R *.DFM}

function ShowForm1(sCap : String) : Integer;
begin
   Application.HintPause := 500;
   Form2 := TForm2.Create(Application);
   try
      with Form2 do begin
         Label1.Caption := sCap;
         Result := ShowModal;
      end;
   finally
      Form2.Free;
   end;
end;

function ShowForm2(var sCap : String) : Integer;
begin
   Application.HintPause := 1000;
   Form2 := TForm2.Create(Application);
   try
      with Form2 do begin
         Label1.Caption := sCap;
         Result := ShowModal;
         sCap := Edit1.Text
      end;
   finally
      Form2.Free;
   end;
end;

end.


+ -

관련 글 리스트
580 [정보] 여러폼 사용하기... vcl 2110 1998/01/08
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.