home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic 4 Unleashed
/
Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso
/
repease
/
dmo_dlp2.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1995-07-19
|
1KB
|
58 lines
unit Dmo_dlp2;
interface
uses WinTypes, WinProcs, Classes, Graphics, Forms, Controls, Buttons,
StdCtrls, sysutils, dialogs, dmo_dlp1;
type
TFormSel = class(TForm)
OKBtn: TBitBtn;
CancelBtn: TBitBtn;
ListBox1: TListBox;
procedure FileSelShow(Sender: TObject);
procedure ListBox1DblClick(Sender: TObject);
procedure OkClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FormSel: TFormSel;
implementation
{$R *.DFM}
procedure TFormSel.FileSelShow(Sender: TObject);
var
i: Integer;
begin
ListBox1.items.clear; { reset the contents}
for i:=0 to TotalForms -1 do
begin
ListBox1.items.AddObject(FormName[i],TObject(i));
end;
end;
procedure TFormSel.ListBox1DblClick(Sender: TObject);
var
idx: integer;
begin
idx:=ListBox1.ItemIndex; {index of the selected item }
SelectedForm:=integer(ListBox1.items.objects[idx]); { set the selected form}
ModalResult:=mrOk;
hide;
end;
procedure TFormSel.OkClick(Sender: TObject);
begin
ListBox1DblClick(sender);
end;
end.