 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
tarochanpan Master Cheater
Reputation: 0
Joined: 25 Jan 2007 Posts: 285 Location: up your arse XD
|
Posted: Fri Oct 26, 2007 10:56 pm Post subject: delphi help |
|
|
i am just at a begginer in delphi and i figured lets remake the google part for the internet browser thing which was placed in the maplestory section i had the idea of shellxecuting a varible and i got the error "string and pansichar incompaible types" can any one help witht this problem
| Code: | unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, shellapi;
type
TForm1 = class(TForm)
GroupBox1: TGroupBox;
Button1: TButton;
Edit1: TEdit;
Button2: TButton;
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button2Click(Sender: TObject);
var s: string;
begin
s := 'www.gooogle.com/search?hl=en&q=' + Edit1.Text + '&meta=';
ShellExecute(Handle, 'open',(s), nil, nil, SW_SHOWNORMAL) ;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
ShellExecute(Handle, 'open','www.google.com', nil, nil, SW_SHOWNORMAL) ;
end;
end. |
_________________
|
|
| Back to top |
|
 |
HolyBlah Master Cheater
Reputation: 2
Joined: 24 Aug 2007 Posts: 446
|
Posted: Sat Oct 27, 2007 5:59 am Post subject: |
|
|
ShellExecute syntax is:
| Code: |
ShellExecute(HWND,Operation,Filename in pchar,parameters in pchar, Folder name in pchar,ShowCmd);
|
so your code shoud look like this:
| Quote: |
procedure TForm1.Button2Click(Sender: TObject);
var s: string;
begin
s := 'www.gooogle.com/search?hl=en&q=' + Edit1.Text + '&meta=';
ShellExecute(Handle, 'open',pchar(s), nil, nil, SW_SHOWNORMAL) ;
end;
|
btw i make something like this some weeks ago.
|
|
| Back to top |
|
 |
tarochanpan Master Cheater
Reputation: 0
Joined: 25 Jan 2007 Posts: 285 Location: up your arse XD
|
Posted: Sun Oct 28, 2007 2:58 am Post subject: |
|
|
thanks man for the help +rep
_________________
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|