Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 25-06-2015
Avatar de kapcomx
kapcomx kapcomx is offline
Miembro
 
Registrado: jun 2007
Ubicación: Puebla México
Posts: 350
Poder: 17
kapcomx Va por buen camino
ejemplo

espero te sirva este ejemplo

es un treeview que muestra 4 opciones cada una manda llamar un formulario

Código Delphi [-]
procedure TfPrincipal.tPVentasClick(Sender: TObject);
begin
     
     if tPVentas.Items[0].Selected then
       begin
            if not createMDI(fPrincipal,tfNvaVenta,fNvaVenta) then
            Application.CreateForm(tfNvaVenta,fNvaVenta);
            PanelPrincipal.Enabled := False;
            fnvaventa.envia:='P';
            fnvaventa.Height:= 650;
            fNvaVenta.Show;
       end;

     if tPVentas.Items[1].Selected then
       begin
            if not createMDI(fPrincipal,tfListVenta,fListVenta) then
            Application.CreateForm(tfListVenta,fListVenta);
            PanelPrincipal.Enabled := False;
            dbds.filtra(dbds.dsventas, dbds.con_ventas +' order by tblpuntodeventa.posid desc');
            flistventa.envia:='P';
            fListVenta.Show;
       end;



     if tPVentas.Items[2].Selected then
       begin
            if not createMDI(fPrincipal,tfCorteCaja,fCorteCaja) then
            Application.CreateForm(tfCorteCaja,fCorteCaja);
            PanelPrincipal.Enabled := False;
            fCorteCaja.envia:='P';
            fCorteCaja.Show;
       end;

     if tPVentas.Items[3].Selected then
       begin
            if not createMDI(fPrincipal,tfrmcorte_parcial,frmcorte_parcial) then
            Application.CreateForm(tfrmcorte_parcial,frmcorte_parcial);
            PanelPrincipal.Enabled := False;
            frmcorte_parcial.envia:='P';
            frmcorte_parcial.Show;
       end;

end;

createmdi es una funcion que uso para saber si el formulario no ha sido creado.

Código Delphi [-]
function tfPrincipal.CreateMDI(Owner:TForm;BaseClass:TFormClass; FormVar:TForm):Boolean;
var
    found:Boolean;
    i:integer;
begin
     Application.ProcessMessages;
     found := False;
//                        Recorremos el array de ventanas hijas
     For i:= 0 To Owner.MDIChildCount-1 Do
         If Owner.MDIChildren[i] is BaseClass Then
           Begin
                Owner.MDIChildren[i].Show;
                found := True;
           End;
     createMDI := Found;
end;

espero te sirva
__________________
un tipo al cual la sociedad no le tiene el mas mínimo respeto no puede ser presidente....
Responder Con Cita
  #2  
Antiguo 25-06-2015
Avatar de Casimiro Notevi
Casimiro Notevi Casimiro Notevi is offline
Moderador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.048
Poder: 10
Casimiro Notevi Tiene un aura espectacularCasimiro Notevi Tiene un aura espectacular
Cita:
Empezado por kapcomx Ver Mensaje
es un treeview que muestra 4 opciones cada una manda llamar un formulario
Vaya, yo no había entendido eso
Responder Con Cita
Respuesta



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Problema al consumir webservice PHP desde Delphi7 apicito OOP 0 16-03-2010 10:37:43
Imprimir desde Delphi7 Elite237 Varios 7 28-07-2007 03:40:59
TDBListBox anda? totote Conexión con bases de datos 9 26-07-2007 23:05:15
Enviar un Email a hotmail desde Delphi7 BuenaOnda Internet 3 26-10-2006 00:21:06
Mostrar los Datos de mi BD en un TDBListBox RiverPlate Conexión con bases de datos 1 06-12-2004 02:00:15


La franja horaria es GMT +2. Ahora son las 06:56:26.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi