Por supuesto. Ahi van:
Código Delphi
[-]
DFM:
object fmEntrenadores: TfmEntrenadores
Left = 265
Top = 211
BorderStyle = bsSingle
ClientWidth = 696
ClientHeight = 480
Caption = 'Entrenadores'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
FormStyle = fsMDIChild
OldCreateOrder = False
Position = poDefault
Visible = True
OnClose = FormClose
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object Panel1: TPanel
Left = 0
Top = 0
Width = 688
Height = 41
Align = alTop
TabOrder = 0
object SpeedButton1: TSpeedButton
Left = 264
Top = 8
Width = 23
Height = 22
Glyph.Data =
NumGlyphs = 2
OnClick = SpeedButton1Click
end
object DBNEntrenadores: TDBNavigator
Left = 8
Top = 8
Width = 240
Height = 25
DataSource = dmEntrenadores.dsEntrenadores
TabOrder = 0
end
end
object PgCtrlEntrenadores: TPageControl
Left = 0
Top = 41
Width = 688
Height = 405
ActivePage = tbShtFicha
Align = alClient
TabIndex = 0
TabOrder = 1
object tbShtFicha: TTabSheet
Caption = 'Ficha'
end
object tbShtNotas: TTabSheet
Caption = 'Notas'
ImageIndex = 1
end
object tbShtLista: TTabSheet
Caption = 'Lista'
ImageIndex = 2
object Panel2: TPanel
Left = 0
Top = 0
Width = 680
Height = 377
Align = alClient
TabOrder = 0
object DBGrid1: TDBGrid
Left = 1
Top = 1
Width = 678
Height = 375
Align = alClient
DataSource = dmEntrenadores.dsEntrenadores
TabOrder = 0
TitleFont.Charset = DEFAULT_CHARSET
TitleFont.Color = clWindowText
TitleFont.Height = -11
TitleFont.Name = 'MS Sans Serif'
TitleFont.Style = []
end
end
end
end
end
PAS:
Código Delphi
[-]
unit ufmEntrenadores;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, DBCtrls, ComCtrls, ExtCtrls, Grids, DBGrids;
type
TfmEntrenadores = class(TForm)
Panel1: TPanel;
PgCtrlEntrenadores: TPageControl;
tbShtFicha: TTabSheet;
tbShtNotas: TTabSheet;
tbShtLista: TTabSheet;
DBNEntrenadores: TDBNavigator;
Panel2: TPanel;
SpeedButton1: TSpeedButton;
DBGrid1: TDBGrid;
procedure SpeedButton1Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
public
end;
var
fmEntrenadores: TfmEntrenadores;
implementation
{$R *.DFM}
procedure TfmEntrenadores.SpeedButton1Click(Sender: TObject);
begin
Close;
end;
procedure TfmEntrenadores.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
Action := caFree;
end;
end.
Un saludo.