Membuat Form Dalam Bentuk dll
Ini mungkin sudah basi ya? tapi nggak papa deh siapa tahu juga masih ada yang butuh informasinya. Seringkali aplikasi yang kita bangun dengan Delphi menghasilkan sebuah file aplikasi (exe) yang berukuran lumayan besar. Semakin banyak form yang kita bangun semakin besar pula aplikasi tersebut. Membuat form dalam bentuk Dynamic Link Library (dll) dapat dilakukan untuk menjadikan aplikasi kita lebih modular sehingga aplikasi utama lebih ramping. Selain itu update aplikasi juga bisa dilakukan lebih ringan jika dilakukan melalui jaringan.
Untuk membuat form dalam bentuk dll pertama kita bisa membuat project baru: Pilih File | New | Other. Kemudian pilih Dll wizard dalam tab New. Maka akan muncul jendela project1.dpr berikut:
library Project1;
{ 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;
{$R *.res}
begin
end.
Kemudian kita bisa tambahkan sebuah form dalam project tersebut. Pilih File | New | Form. Form tersebut yang nantinya akan kita panggil. Setelah itu kita buat sebuah Fungsi untuk memanggil form tersebut.
Function showform:integer;stdcall;
begin
form1 := TForm1.Create(nil);
Form1.ShowModal;
end;
Dan eksport fungsi tersebut agar dapat digunakan oleh aplikasi pemanggilnya.
Exports
showform;
Script lengkapnya menjadi demikian:
library project1;
uses
SysUtils,
Classes,
Unit1 in 'pasUnit1.pas' {Form1};
{$R *.res}
Function showform:integer;stdcall;
begin
form1 := TForm1.Create(nil);
Form1.ShowModal;
end;
Exports
showform;
begin
end.
Project tersebut akan menghasilkan project1.dll jika dikompile. Nah untuk mencoba memanggil form yang ada dalam project1.dll kita bisa mencoba dengan membuat sebuah project misalnya prjpemanggil.dpr yang mempunyai sebuah button untuk memanggil form dari project1.dll. Letakkan project1.dll dalam satu direktori dengan prjpemanggil. Deklarasi fungsi showform dalam projec1.dll adalah sebagai berikut:
function showform:integer;stdcall;external 'project1.DLL';
Berikut script untuk prjpemanggil:
unit Pemanggil; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TFormku = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Formku: TFormku; implementation {$R *.dfm} function showform:integer;stdcall;external 'project1.DLL'; procedure TFormku.Button1Click(Sender: TObject); begin showform; end; end.
65 Responses to “Membuat Form Dalam Bentuk dll”
By Suluh on Aug 25, 2007 | Reply
ramudeng aku too… maklum bukan programer …
By Canon on Aug 25, 2007 | Reply
filosof…. qi?
By Suluh on Sep 1, 2007 | Reply
bukan juga…
By Canon on Sep 7, 2007 | Reply
ustadz?
By deny on Dec 3, 2007 | Reply
bagaimana cara membuat form dll menjadi MDIChildForm
By Canon on Dec 11, 2007 | Reply
By Hery on Jan 5, 2008 | Reply
Met kenal, tolong kl bs bantu ya?
Ak pake DOS Command “mountvol” trus muncul volume id msg2 drive kan? Misal, ak mo ambil volume id drive C: aja, trus ditampilkan di Edit1. Gmn ya?
By adjie on Mar 14, 2008 | Reply
tolong kirim source delphinya dalam bentuk (.dpr) untuk server dan client nya….thanks..!!!!!penting banget,buat ngerjain tugas akhir…..tolong….
By fendi on Apr 26, 2008 | Reply
tolong duuuuk…buat yang pdf..
thx
By wow power leveling on Jun 24, 2009 | Reply
This is a great article. I’m new to blogging but still learning. Thanks for the great resource.
By links of london on Sep 1, 2009 | Reply
Thanks for your information!
By links of london jewellery on Sep 2, 2009 | Reply
Thank you!
By Tiffany Rings on Oct 5, 2009 | Reply
Thanks for your information!
By DDos Protection on Nov 10, 2009 | Reply
Thanks for your information!
By ed hardy on Nov 25, 2009 | Reply
Thanks for your inforamtion!
By ed hardy on Nov 26, 2009 | Reply
This is a great article. I’m new to blogging but still learning. Thanks for the great resource.
By gucci shoes on Nov 27, 2009 | Reply
Thanks for your inforamtion!best good
By ugg boots sale on Jan 21, 2010 | Reply
Thanks !
By m65 field jacket on Jan 25, 2010 | Reply
thanks for the share
By Gucci boots on Feb 1, 2010 | Reply
thanks
By aptop battery review on Feb 4, 2010 | Reply
scrap mobile aptop battery review contain a valuable resource, recycling and reuse can bring significant economic value.
By Abercrombie and Fitch Jeans on Feb 5, 2010 | Reply
Good post! Thanks for your information!
By ultra tall ugg boots on Feb 24, 2010 | Reply
UGG boots snow Sindy recently discovered more and more prosperous, and both Taobao shop down the street, or even the big mall, can be seen claiming to be authentic or a replica of the UGG style boots in the snow with big sales.
By christian louboutin on Feb 25, 2010 | Reply
This is a great article. I’m new to blogging but still learning. Thanks for the great resource.Christian Louboutin Sandals
By ed hardy on Mar 5, 2010 | Reply
UGG boots snow Sindy recently discovered more and more prosperous, and both Taobao shop down the street, or even the big mall, can be seen claiming to be authentic or a replica of the UGG style boots in the snow with big sales.
By kamagra on Mar 10, 2010 | Reply
Good post! Thanks for your information! m65 jacket is a popular military jacket.
By christian louboutin on Mar 19, 2010 | Reply
UGG boots snow Sindy recently discovered more and more prosperous, and both Taobao shop down the street, or even the big mall, can be seen claiming to be authentic or a replica of the UGG style boots in the snow with big sales.
By mbt shoes on Mar 22, 2010 | Reply
DOIT
By thomas sabo on Mar 24, 2010 | Reply
This is a great article. I’m new to blogging but still learning. Thanks for the great resource.
By mbt shoes on Apr 2, 2010 | Reply
welcome to buy mbt shoes
new style with free shipping 40% off offering.
By golf umbrella on Apr 13, 2010 | Reply
Oh, so unexpected, so surprise! Very touching, so well written and I have some perception, learning very much. Thank you for sharing. Very happy to see these and believe that your point of view. This same time,i love umbrellas very much !
By top toys on Apr 14, 2010 | Reply
welcome to buy top toys
http://www.toptoys2trade.com/
high quality and suitable price.
enjoy our excellent product here
By golf equipment on Apr 16, 2010 | Reply
welcome to golf equipment
and look forward to your best choice for golf-equipment.
By lacoste polo on May 6, 2010 | Reply
Thanks for your nice share. [url= http://www.polob2c.comlacoste polo [/]url
By dragon pearl jasmine on May 7, 2010 | Reply
i like drink tea,especia jasmine flower tea,it is good for humans.
By Nike Air Max on May 14, 2010 | Reply
nike air max
By Nike Air Max on May 14, 2010 | Reply
http://www.airmax-shox.com/en/category/6-nike-air-max-series.html
By Nike Air Max on May 15, 2010 | Reply
I really appreciate your help, it is very useful for me,you will get good grades!
http://www.airmax-shox.com/en/category/6-nike-air-max-series.html
By p90x workout on May 18, 2010 | Reply
Thanks for you post!
http://www.p90xmall.com
By Nike Air Max on May 19, 2010 | Reply
http://www.airmax-shox.com/en/category/6-nike-air-max-series.html
Nike Air Rift, premiered in 1995, was a hit with both the bohemian and the nightclub crowds. This unusual split toed shoe was origianlly designed for the Kenyan runners who were used to running barefoot but were required to have footwear at many events. the split toe is made for comfort and flexibility.This special shoes are soft with breathable synthetic upper.
By nike air max on May 26, 2010 | Reply
Thank u for share
http://www.airmax-shox.com/en/category/6-nike-air-max-series.html
Nike Air Max
By nike air max on May 31, 2010 | Reply
Really really good stuff men !!! thanks !!!
http://www.airmax-shox.com
Nike Air Max
By fossil watches on Jun 4, 2010 | Reply
thank you for share with us,i like it very much and i will always come to attention. http://www.watches-user.com
By nike air max on Jun 7, 2010 | Reply
So beautiful sharing!Thank you very much.I share is good!It is so nice.Many good titles in this also.
http://www.airmax-shox.com
Nike Air Max
By mbt kisumu white on Jun 7, 2010 | Reply
It’s so lucky for me to find your blog! So shocking and great! Just one suggestion: It will be better and easier to follow.
http://www.mbtshoes2your.com/mbt-kisumu-black-sandals-for-menwomen-p-127.html
By nike air max on Jun 13, 2010 | Reply
This is a good post,thank you.This is the classic benefits in the shoes, you can see luo, quality assurance.
http://www.airmax-shox.com
Nike Air Max
By Nike Air Max on Jun 17, 2010 | Reply
So beautiful sharing!Thank you very much.
http://www.airmax-shox.com/en/category/6-nike-air-max-series.html
By Nike Air Max on Jun 18, 2010 | Reply
http://www.airmax-shox.com/en/category/12-nike-shox-series.html
Best wishes!Your blog is very good!
By sexy lingerie on Jun 18, 2010 | Reply
Thanks for article. Everytime like to read. I have really enjoyed browsing your posts. Lingerie wholesale Thanks for sharing this information. Someone on Yahoo Answers referred me here and I love it
By nike air max on Jun 22, 2010 | Reply
http://www.airmax-shox.com/en/category/12-nike-shox-series.html
Best wishes!Your blog is very good!~~~
By Nike Air Max on Jun 25, 2010 | Reply
http://www.airmax-shox.com/en/category/6-nike-air-max-series.html
Thanks for article. Everytime like to read you.~~!!!
By nike air max on Jun 27, 2010 | Reply
http://www.airmax-shox.com/en/category/6-nike-air-max-series.html
Thanks for your great work.~~!!
By nike air max on Jun 28, 2010 | Reply
http://www.airmax-shox.com/en/category/6-nike-air-max-series.html
Thanks for article. Everytime like to read you.~!!~~
By nike air max on Jun 30, 2010 | Reply
http://www.airmax-shox.com/en/category/6-nike-air-max-series.html
This is awesome article!~~!~
By GHD straighteners on Jul 5, 2010 | Reply
I loved the editorial.It is very interesting.Thank you for the information
By cheap jerseys on Jul 5, 2010 | Reply
As a Freshman, I am always searching online for articles that can help me get further ahead. Thanks a million!
By MBTshoes on Jul 5, 2010 | Reply
Enjoyed every bit of your blog.Thanks Again. Great.
By UGG boots on Jul 5, 2010 | Reply
Great thanks for sharing this article post. Awesome.
By air max 90 on Jul 13, 2010 | Reply
Yesterday, the French National Assembly convenes Domenech and France
By mymp3mp4mp5 on Jul 15, 2010 | Reply
Get cheap mp3 players,high quality MP3 players,MP4 players,MP5 players and more from http://www.mymp3mp4mp5.com
By power balance on Jul 26, 2010 | Reply
animal shaped rubber bands
By Baby Carriers on Aug 5, 2010 | Reply
http://www.toptoys2trade.com/animal-rubber-bands-c-46/
By MaxwellJuana28 on Aug 17, 2010 | Reply
According to my exploration, millions of people all over the world get the loan at good banks. Thence, there’s a good chance to find a car loan in any country.
By louis vuitton shoes on Aug 25, 2010 | Reply
Thanks for sharing your article. I really enjoyed it. I put a link to my site to here so other people can read it. My readers have about the same interets