|
From: Peter T. <pe...@us...> - 2003-08-23 23:18:35
|
Update of /cvsroot/jvcl/dev/JVCL3/examples/JvAppDDECmd
In directory sc8-pr-cvs1:/tmp/cvs-serv4702/JVCL3/examples/JvAppDDECmd
Added Files:
AppDdeCmdExample.dof AppDdeCmdExample.dpr AppDdeCmdExample.res
AppDdeCmdMain.dfm AppDdeCmdMain.pas AppDdeCmdModal.dfm
AppDdeCmdModal.pas
Log Message:
- Copied jvcl/devtools and jvcl/examples dev/JVCL3
- Copied JVCLConvert *.dat files to dev/JVCL3/converter
--- NEW FILE: AppDdeCmdExample.dof ---
[Directories]
OutputDir=..\..\Bin
UnitOutputDir=..\..\Dcu
SearchPath=..\..\Source;..\..\Common
--- NEW FILE: AppDdeCmdExample.dpr ---
program AppDdeCmdExample;
uses
Forms,
AppDdeCmdMain in 'AppDdeCmdMain.pas' {MainForm},
AppDdeCmdModal in 'AppDdeCmdModal.pas' {Form2};
{$R *.RES}
begin
Application.Initialize;
Application.Title := 'MyApp';
Application.CreateForm(TMainForm, MainForm);
Application.CreateForm(TForm2, Form2);
Application.Run;
end.
--- NEW FILE: AppDdeCmdExample.res ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: AppDdeCmdMain.dfm ---
object MainForm: TMainForm
Left = 419
Top = 117
Width = 536
Height = 393
Caption = 'TJvAppDdeCmd Example'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object Memo1: TMemo
Left = 0
Top = 0
Width = 528
Height = 325
Align = alClient
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -12
Font.Name = 'Courier New'
Font.Style = []
ParentFont = False
ReadOnly = True
ScrollBars = ssBoth
TabOrder = 0
end
object Panel1: TPanel
Left = 0
Top = 325
Width = 528
Height = 41
Align = alBottom
BevelOuter = bvNone
TabOrder = 1
object Label1: TLabel
Left = 128
Top = 16
Width = 32
Height = 13
Caption = 'Label1'
end
object Button1: TButton
Left = 8
Top = 8
Width = 113
Height = 25
Caption = 'Show Modal Dialog'
TabOrder = 0
OnClick = Button1Click
end
end
object JvAppDdeCmd1: TJvAppDdeCmd
CorrectParams = True
OnBusyChanged = PvAppDdeCmd1BusyChanged
OnExecParsedCmd = PvAppDdeCmd1ExecParsedCmd
Left = 8
Top = 272
end
end
--- NEW FILE: AppDdeCmdMain.pas ---
unit AppDdeCmdMain;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
ExtCtrls, StdCtrls, JvDdeCmd, JvComponent;
type
TMainForm = class(TForm)
Memo1: TMemo;
Panel1: TPanel;
Button1: TButton;
Label1: TLabel;
JvAppDdeCmd1: TJvAppDdeCmd;
procedure PvAppDdeCmd1ExecParsedCmd(Sender: TObject;
const Command: string; Parameters: TStrings);
procedure Button1Click(Sender: TObject);
procedure PvAppDdeCmd1BusyChanged(Sender: TObject; IsBusy: Boolean);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
MainForm: TMainForm;
implementation
uses AppDdeCmdModal;
{$R *.DFM}
procedure TMainForm.FormCreate(Sender: TObject);
begin
PvAppDdeCmd1BusyChanged(nil, False);
end;
procedure TMainForm.PvAppDdeCmd1ExecParsedCmd(Sender: TObject;
const Command: string; Parameters: TStrings);
var
I: Integer;
S: String;
begin
with Memo1.Lines do
begin
Add(Format('Command: %s', [Command]));
for I := 0 to Parameters.Count - 1 do
begin
S := #9 + Parameters.Strings[I];
if Assigned(Parameters.Objects[I]) then S := S + ' <- Integer Value';
Add(S);
end;
Add('');
end;
end;
procedure TMainForm.PvAppDdeCmd1BusyChanged(Sender: TObject; IsBusy: Boolean);
const
EnabledStr: array[Boolean] of String = ('Ready', 'Busy');
begin
Label1.Caption := EnabledStr[IsBusy];
end;
procedure TMainForm.Button1Click(Sender: TObject);
begin
Form2.ShowModal;
end;
end.
--- NEW FILE: AppDdeCmdModal.dfm ---
object Form2: TForm2
Left = 254
Top = 194
BorderStyle = bsDialog
Caption = 'Modal dialog'
ClientHeight = 91
ClientWidth = 153
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
PixelsPerInch = 96
TextHeight = 13
object Button1: TButton
Left = 40
Top = 24
Width = 75
Height = 25
Cancel = True
Caption = 'Close'
ModalResult = 1
TabOrder = 0
end
end
--- NEW FILE: AppDdeCmdModal.pas ---
unit AppDdeCmdModal;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm2 = class(TForm)
Button1: TButton;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.DFM}
end.
|