Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

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

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #6  
Antiguo 10-08-2012
CSIE CSIE is offline
Miembro
 
Registrado: feb 2008
Ubicación: Universo paralelo
Posts: 69
Poder: 19
CSIE Va por buen camino
Algo asi debería funcionarte (no lo he probado )

Código Delphi [-]
library CLDRes;

uses
  ShareMem, //Importante
  SysUtils,
  Classes,
  bsSkinData,
  Forms,
  Controls,
  uPassOk in 'FORM\uPassOk.pas' {wPassOk};

{$R *.res}


function DisplayModalForm(AHandle: THandle; S: String): Boolean; stdcall;
begin
     result := False;
     Application.Handle := AHandle;
     with TwPassOk.Create(Application) do
     try
       if ShowModal = mrOk then
         result := S = pePass.Text; 
     finally
       Free;
     end;
end;

  exports
    DisplayModalForm;
begin
end.

Código Delphi [-]
procedure TwMain.ClickStateChange(Sender: TObject);
const
  DLLNAME = 'CLDRes.dll';
var
  Passw: Boolean;
  DllHandle : THandle;
  DlgForm: procedure (H : THandle; S: string); stdcall;
begin
  with wDataModule do
    if dsUser.State = dsInsert then
      if (Sender as TbsSkinButton).Name = 'btAdmPost' then
      begin
        try
          DllHandle := LoadLibrary(DLLNAME);             
          if DllHandle <>0 then
          begin
             DlgForm := GetProcAddress(DllHandle,'DisplayModalForm');
             Passw := DlgForm(Application.Handle, dsUserPASS.AsString);
             ShowMessage(BoolToStr(Passw));
          end
          else
            ShowMessage(Format('Error al cargar %s',[DLLNAME]));          
        finally
          FreeLibrary(DllHandle);
        end;      
      end;
end;
Responder Con Cita
 



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
Determinar en un Form Principal cuando se Cierra un Form Hijo Efren2006 OOP 5 26-02-2009 20:08:35
llamar al evento click de un boton q se encuentra en un form desde otro form TURBOIGOR OOP 6 02-12-2008 14:50:16
Como llamar form desde otros form y regresar a la linea que se estaba ejecutando Willy Rodrigo C++ Builder 1 03-08-2007 19:36:23
Form modal deja que el form llamante tome el foco tata Varios 6 17-05-2006 11:51:37
Imposible hacer visible un form desde otro form SMTZ .NET 13 16-01-2006 21:41:08


La franja horaria es GMT +2. Ahora son las 01:22:20.


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