Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
CallForm.pas
Package: delphi.rar [view]
Upload User: fh681027
Upload Date: 2022-07-23
Package Size: 1959k
Code Size: 2k
Category:
Delphi VCL
Development Platform:
Delphi
- unit CallForm;
- interface
- uses
- SysUtils, Windows, Messages, Classes, Graphics, Controls,
- Forms, Dialogs, StdCtrls, Spin, ExtCtrls;
- type
- TForm1 = class(TForm)
- BtnDouble: TButton;
- SpinEdit1: TSpinEdit;
- Label1: TLabel;
- BtnTriple: TButton;
- Label2: TLabel;
- SpinEdit2: TSpinEdit;
- BtnDoubleString: TButton;
- BtnDoublePChar: TButton;
- EditSource: TEdit;
- EditDouble: TEdit;
- Label3: TLabel;
- Label4: TLabel;
- Bevel1: TBevel;
- Bevel2: TBevel;
- procedure BtnDoubleClick(Sender: TObject);
- procedure BtnTripleClick(Sender: TObject);
- procedure BtnDoubleStringClick(Sender: TObject);
- procedure BtnDoublePCharClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- Form1: TForm1;
- implementation
- {$R *.DFM}
- {functions of the Delphi DLL}
- function Double (N: Integer): Integer;
- stdcall; external 'FIRSTDLL.DLL';
- function Triple (N: Integer): Integer;
- stdcall; external 'FIRSTDLL.DLL';
- function DoubleString (S: string; Separator: Char): string;
- stdcall; external 'FIRSTDLL.DLL';
- function DoublePChar (BufferIn, BufferOut: PChar;
- BufferOutLen: Cardinal; Separator: Char): LongBool;
- stdcall; external 'FIRSTDLL.DLL';
- procedure TForm1.BtnDoubleClick(Sender: TObject);
- begin
- SpinEdit1.Value := Double (SpinEdit1.Value);
- end;
- procedure TForm1.BtnTripleClick(Sender: TObject);
- begin
- SpinEdit2.Value:= Triple (SpinEdit2.Value);
- end;
- procedure TForm1.BtnDoubleStringClick(Sender: TObject);
- begin
- // call the DLL function directly
- EditDouble.Text :=
- DoubleString (EditSource.Text, ';');
- end;
- procedure TForm1.BtnDoublePCharClick(Sender: TObject);
- var
- Buffer: string;
- begin
- // make the buffer large enough
- SetLength (Buffer, 1000);
- // call the DLL function
- if DoublePChar (PChar (EditSource.Text), PChar (Buffer), 1000, '/') then
- EditDouble.Text := Buffer;
- end;
- end.