Autor Beitrag
DiggiDi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 60



BeitragVerfasst: Mi 03.03.04 15:02 
hallo

kann mir einer sagen wie ich IE aktualisieren kann?
also ich muss eine message an IE fenster schicken dass F5 taste gedrückt wurde aber wie mach ich das?

danke im voraus!
MaxiTB
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 679

Win2000, WinXp, Workbench ;-)
D7 Ent, VS2003 Arch.
BeitragVerfasst: Mi 03.03.04 15:12 
Das ist schweirig ... nämlich ...

:arrow: Erstens gibts viele, die keinen IE benutzen, dann funkt dein Proggi für die nicht.

:arrow: Zweitens wie willst du das richtige IE Fenster ermitteln, wenn mehrere offen sind oder brutal alle aktualisieren ? (Dann schlag ich aber dein Proggi ;-) ).

_________________
Euer Mäxchen
Wer früher stirbt, ist länger tot.
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: Mi 03.03.04 17:48 
Zitat:
Erstens gibts viele, die keinen IE benutzen, dann funkt dein Proggi für die nicht.


vielleicht möchte er ja jene Funktion nur für sich selber benützen...

Alle IE Fenster aktualisieren geht so:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
uses
 MSHTML_TLB, SHDocVw_TLB;

procedure TForm1.Button1Click(Sender: TObject);
var
 ShellWindow: IShellWindows;
 WB: IWebbrowser2;
 spDisp: IDispatch;
 IDoc1: IHTMLDocument2;
 k: Integer;
begin
 ShellWindow := CoShellWindows.Create;
 for k := 0 to ShellWindow.Count do
 begin
   spDisp := ShellWindow.Item(k);
   if spDisp = nil then Continue;
   spDisp.QueryInterface(iWebBrowser2, WB);
   if WB <> nil then
   begin
     WB.Document.QueryInterface(IHTMLDocument2, iDoc1);
     if iDoc1 <> nil then
     begin
       WB := ShellWindow.Item(k) as IWebbrowser2;
       WB.Refresh;
     end;
   end;
 end;
end;