Hwnd: THandle;webbrowser1.Navigate('http://www.hahabbmodel.com/dasai_vote_do.asp?modelid=100742');
Hwnd:=FindWindow(PChar('#32770'),PChar('Microsoft Internet Explorer'));
SendMessage(Hwnd,Vk_RETURN,0,0);
我是这么写,但是没有反应,是哪里有问题
Hwnd:=FindWindow(PChar('#32770'),PChar('Microsoft Internet Explorer'));
SendMessage(Hwnd,Vk_RETURN,0,0);
我是这么写,但是没有反应,是哪里有问题
//**********************************************
//自动关闭对话框
//**********************************************
procedure TForm1.WMActivate(var Msg: TWMActivate);
var
S: String;
wnd: HWND;
I: Integer;
begin
Application.ProcessMessages;
if isliulan or isliuyan then
begin
If Msg.Active = 0 then
begin
wnd := Msg.ActiveWindow;
I := GetWindowTextLength(wnd);
SetLength(S,I + 1);
GetWindowText(Wnd,PChar(S),I + 1);
If Pos('Internet Explorer',S) > 0 then
Begin
SendMessage(Wnd,WM_CLOSE,0,0);
End; end;
end;
end;
//*********************************************
InternetSetCookie
这两个函数是否可以让WebBrowser显示登陆后的界面?