Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Internet
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Colaboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #3  
Antiguo 30-10-2012
Avatar de nlsgarcia
[nlsgarcia] nlsgarcia is offline
Miembro Premium
 
Registrado: feb 2007
Ubicación: Caracas, Venezuela
Posts: 2.206
Poder: 23
nlsgarcia Tiene un aura espectacularnlsgarcia Tiene un aura espectacular
Gerson12,

Revisa el siguiente código tomado del link : http://www.delphipages.com/forum/sho...d.php?t=152828
Código Delphi [-]
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ShellApi;

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
    Function OpenObject(strObjectPath:string) : boolean;
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

Function TForm1.OpenObject(strObjectPath:string) : boolean;
var
   h : integer;
   zFname: array[0..79] of Char;

begin

   result := true;

   h := ShellExecute
        (
           0,
           'open',
           StrPcopy(zFname,'http://www.google.com/search?hl=en&q=' + strobjectpath),
           NIL,
           NIL,
           SW_SHOWNORMAL
        );

   if h < 33 then result := false;

end;

procedure TForm1.Button1Click(Sender: TObject);
begin
   if not OpenObject(Edit1.Text) then
      MessageDlg('Can''t open default WEB Browser.', mtError,[mbOk], 0);
end;

end.
El código anterior invoca al Browser por defecto y realiza una búsqueda en Google pasando un TEdit como parámetro.

Espero sea útil

Nelson.

Última edición por nlsgarcia fecha: 30-10-2012 a las 06:41:18.
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

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
WebBrowser en modo texto titomigue Internet 5 19-06-2010 22:48:33
Enviar texto a word yorllito Servers 2 18-08-2006 10:20:06
Enviar Texto Al MSN Messenger 6 n3ck Internet 1 24-01-2005 13:16:42
Buscar texto en WebBrowser ciscu Internet 2 17-03-2004 16:32:01
Buscar texto en WebBrowser ciscu Varios 2 16-03-2004 20:24:04


La franja horaria es GMT +2. Ahora son las 09:49:58.


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