Que tal Caral
gracias por la ayuda, mira esta es la funcion cuando se crea el calendario, y le acabo de agregar que mientras se va creando va cargando informacion si hay alguna actividad en dicho dia.
Espero les guste
saludos
Código Delphi
[-]
procedure TfrmPrincipal.CreaCalendario(const Fecha :TDateTime);
var
Dias, cont, TheTop : Integer;
Dia, aCelda : TfrmCelda;
aNombre : String;
begin
LockWindowUpdate(self.handle);
TheTop:= 36;
Dias := DaysInMonth(Fecha); for cont := 1 to Dias do
begin
dia := TfrmCelda.Create(frmPrincipal.tbCalendario);
dia.Fecha := RecodeDay(fecha,cont); dia.Name := dia.Name + IntToStr(cont); dia.Left:= (DayOfTheWeek(dia.Fecha)-1) * dia.Width; if dia.Left = 0 then
TheTop := TheTop + dia.Height; dia.Top := TheTop;
dia.Parent:= frmPrincipal.tbCalendario; frmPrincipal.ADOQuery2.Close;
frmPrincipal.ADOQuery2.Parameters.ParamByName('An').Value := StrToInt(frmPrincipal.EAn.Text);
frmPrincipal.ADOQuery2.Parameters.ParamByName('Me').Value := StrToInt(frmPrincipal.EMes.Text);
frmPrincipal.ADOQuery2.Parameters.ParamByName('Di').Value := cont;
frmPrincipal.ADOQuery2.Open;
if frmPrincipal.ADOQuery2.RecordCount > 0 then
begin
dia.Memo1.Text := ADOQuery2comentarios.Value;
end;
LockWindowUpdate(0);
end;
end;