home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 May
/
Pcwk0597.iso
/
borland
/
cb
/
setup
/
cbuilder
/
data.z
/
AUTO1.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-28
|
1KB
|
43 lines
//----------------------------------------------------------------------------
//Borland C++Builder
//Copyright (c) 1987, 1997 Borland International Inc. All Rights Reserved.
//----------------------------------------------------------------------------
//---------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "auto1.h"
//---------------------------------------------------------------------
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent *Owner)
: TForm(Owner)
{
try
{
AutoServer = CreateOleObject("BCBAutoSrv.EditServer");
}
catch (...)
{
ShowMessage("Please build and run the AutoSrv example before this one.");
Application->Terminate();
}
}
//---------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
AutoServer.OlePropertySet("EditStr", Edit1->Text);
}
//---------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
Edit1->Text = AutoServer.OlePropertyGet("EditStr");
}
//---------------------------------------------------------------------
void __fastcall TForm1::Button3Click(TObject *Sender)
{
AutoServer.OleProcedure("Clear");
}
//---------------------------------------------------------------------