Вниз
Скачать: CL | DM;

Dll & Form   Найти похожие ветки 

 
Mantor   (2003-10-02 13:51) [0]

Данная тема как-то проскакивала в форуме, но решения я так и не нашёл.
Так вот проблема:
создаю dll с формой, в другом приложении вызываю эту форму из dll. При этом предварительно передаю хэндл приложения в dll и присваиваю его в форме. И всё равно форма из dll видна в панели задач вместе с приложением, а мне это не надо.
Как избавиться от этого.


 
Skier ©   (2003-10-02 13:53) [1]


> и присваиваю его в форме.

Это что-то новенькое...

Действуй так : (в DLL)

Application.Handle := HostAppHandle;


 
Radionov Alexey ©   (2003-10-02 13:57) [2]

в help есть раздел
Visibility of Taskbar Buttons
там также что-то говорят про
WS_EX_TOOLWINDOW


 
Radionov Alexey ©   (2003-10-02 13:57) [3]

Сорри, про WS_EX_APPWINDOW :))


 
AbrosimovA ©   (2003-10-02 14:20) [4]

У меня сделано так и в панели задач кнопка только главной формы.

********DialogDLL.dll***********
--------DialogDLL.dpr-----------

library DialogDLL;

uses
SysUtils,
Classes,
About in "About.pas" {AboutBox};

{$R *.res}

exports AboutD;

begin
end.

---------About.pas-----------

unit About;

interface

uses ...;

type
TAboutBox = class(TForm)
OKButton: TButton;
...
procedure OKButtonClick(Sender: TObject);

var
AboutBox: TAboutBox;
function AboutD: boolean;

function AboutD: boolean;
begin
AboutBox := TAboutBox.Create(Application);
AboutBox.ShowModal;
end;

procedure TAboutBox.OKButtonClick(Sender: TObject);
begin
AboutBox.Close;
end;


**********Main.exe***********
----------Pro.pas------------

unit Pro;

uses ...., About;

type TAboutD=function:boolean;stdcall;

type
TForm1 = class(TForm)
MainMenu1: TMainMenu;
N1: TMenuItem;//О программе
...

private
{ Private declarations }
DLLHandle: THandle;
ExternalFunctionAboutD: TAboutD;
public
end;
{ Public declarations }

var
Form1: TForm1;
AboutDLL: boolean;

implementation

{$R *.dfm}

procedure TForm1.N1Click(Sender: TObject);
begin
DLLHandle:=LoadLibrary("DialogDLL.dll");
try
@ExternalFunctionAboutD:=GetProcAddress(DLLHandle,PChar("AboutD"));
AboutDLL:=AboutD;
finally
FreeLibrary(DLLHandle);
end;
end;

end.


 
Mantor   (2003-10-02 15:21) [5]

2 Skier

Описка, не в форме а в DLL Application.Handle := AHandle
где AHandle - параметр



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.46 MB
Время: 0.016 c
3-40230
bobtubob
2003-09-22 17:03
2003.10.13
Как в DBGrid изменить цвет выделения (select)


14-40634
Knight
2003-09-22 11:30
2003.10.13
---|Ветка была без названия|---


1-40482
Yanis
2003-10-03 11:36
2003.10.13
Как изменить цвет выделения в ричьедит?


4-40746
arous
2003-08-05 00:12
2003.10.13
Сеансы WinXP


14-40669
человек
2003-09-23 14:15
2003.10.13
Кадеты. Помогите найти! Я не нашел про них!!! ПОМИРАЮ!!!




   Наверх