Delphi DLL / GUI Elements

60 views
Skip to first unread message

Benjamin Venditti

unread,
May 4, 2012, 4:39:38 AM5/4/12
to Java Native Access
Hi there,

i am currently working on a DLL (Delhie 2010) in order to display a
Window. The code is as follows:

------------- SNIP -------------------
function DisplayForm1(): integer; stdcall;
begin
With TForm1.Create(nil) do
begin
Show();
end;
Result := 0;
end;

exports DisplayForm1 name 'DisplayForm1';

// TForm1 is just a empty Form with just a single button on it.
------------- SNAP -------------------

This call is exported properly and can be called from Java via JNA.
However the window/form is just shown for a blink and disappears then
immediately. I have allready tested this DLL with VC++ and C#
successfully (i.e. the Form stays open until i close it).

So my question now. Has anyone a idea why the window/form is not
staying open?

Any help or hints are highly appreciated!

cherio
benjamin

Benjamin Venditti

unread,
May 4, 2012, 4:52:22 AM5/4/12
to jna-...@googlegroups.com
Okay i withdraw my question. It is neither working with C# nor C++. I guess i'll have to dive into that problem more deeply as it is not related to JNA.
Reply all
Reply to author
Forward
0 new messages