📄 fdiiclientmain.pas
字号:
unit fDIIClientMain;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Db, DBClient, Grids, DBGrids, StdCtrls, Buttons, DBCtrls, ExtCtrls;
type
TfrmDIIClientMain = class(TForm)
BitBtn2: TBitBtn;
ListBox1: TListBox;
procedure BitBtn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frmDIIClientMain: TfrmDIIClientMain;
implementation
{$R *.DFM}
uses CorbaObj;
procedure TfrmDIIClientMain.BitBtn2Click(Sender: TObject);
var
cbDBServerFactory, cbDBServer : TAny;
vEmployees : Variant;
iCount : Integer;
begin
try
cbDBServerFactory := ORB.Bind('IDL:PDIIServer/CORBADIIServerFactory:1.0');
cbDBServer := cbDBServerFactory.CreateInstance('');
vEmployees := cbDBServer.Employees;
if VarIsArray(vEmployees) then
begin
try
ListBox1.Items.BeginUpdate;
for iCount := VarArrayLowBound(vEmployees, 1) to VarArrayHighBound(vEmployees, 1) do
begin
ListBox1.Items.Add(vEmployees[iCount]);
end;
finally
ListBox1.Items.EndUpdate;
end;
end;
except
on E:Exception do
ShowMessage(E.Message);
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -