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
[8920] Re:mdi child(dll) 중복실행 방지??
il's [magicfox] 1499 읽음    2003-08-11 16:57
MDI CHild 프로젝트 파일을 다음과 같이 하시면 되네요 ...

library ChildDll;

{ Important note about DLL memory management: ShareMem must be the
  first unit in your library's USES clause AND your project's (select
  Project-View Source) USES clause if your DLL exports any procedures or
  functions that pass strings as parameters or function results. This
  applies to all strings passed to and from your DLL--even those that
  are nested in records and classes. ShareMem is the interface unit to
  the BORLNDMM.DLL shared memory manager, which must be deployed along
  with your DLL. To avoid using BORLNDMM.DLL, pass string information
  using PChar or ShortString parameters. }

uses
  SysUtils,
  Classes,
  Forms,
  Windows,
  Controls,
  ChildFormUnit in 'ChildFormUnit.pas' {ChildForm};

{$R *.res}

var
    DllApplication : TApplication;
    ChildForm: TChildForm;

procedure ChildFormProc(Reason: Integer);
begin
    if Reason = DLL_PROCESS_DETACH then
    begin
        if Assigned(DllApplication) then
        begin
            Application := DllApplication;
        end;
    end;
end;

procedure ChildFormCreate(Sender : TApplication); stdcall;
begin
    if not Assigned(DllApplication) then
    begin
        DllApplication := Application;
        Application := Sender;
    end;

    if ChildForm= nil then
    begin
        ChildForm:= TChildForm.Create(Sender);
        MicrobeViewerForm.Show();
    end
    else
    begin
        if ChildForm.Showing then
        begin
            BringWindowToTop(ChildForm.Handle);
        end
        else
        begin
            ChildForm:= TChildForm.Create(Sender);
            ChildForm.Show();
        end;
    end;

end;

exports
    ChildFormCreate;

begin
    DllApplication := nil;
    DllProc := @ChildFormProc;
end.




카오스 님이 쓰신 글 :
:
:  말그대로입니다.
:
:  mdi child를 dll로 사용할 경우..
:
:  창이 떠있을때..
:
:  호출을 해도 새로운 창이 출력되지 않게
:
:  하려면.. 어케해야 하나요??
:
:  질답란을 뒤져서 나온 방법으로 구현을 해보아도
:
:  잘 되질 않는군여.
:

+ -

관련 글 리스트
8876 mdi child(dll) 중복실행 방지?? 카오스 881 2003/07/14
8920     Re:mdi child(dll) 중복실행 방지?? il's 1499 2003/08/11
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.