以下程序error : e2035 not enough actual parameters
在 2 个地方(第 39 行和第 45 行)返回并且未编译。有人可以帮我吗?我可以在这里用 0 或 null 代替参数吗?
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,ComObj,shdocvw,activex, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
mybrowser : iwebbrowser2;
myUserName,
myPassword,loginURL : string;
Flags: OleVariant;
begin
Flags := navOpenInNewWindow;
MyBrowser := CreateOleObject('InternetExplorer.Application') as IWebBrowser2;
MyBrowser.Navigate('http://www.gmail.com',flags,'_blank');
myUserName := 'UserName';
myPassword := 'password';
loginURL:='javascript:var Email = document.getElementById(''Email'');Email.value=''' + myUserName + ''';var Password = document.getElementById(''Passwd'');Password.value=''' + myPassword + ''';var SignIn = document.getElementById(''signIn'');SignIn.click();';
MyBrowser.Navigate(loginURL);
end;
end.