Autor Beitrag
zero_cool1986
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 95

MS DOS ;)
D6
BeitragVerfasst: Sa 27.08.05 19:09 
hi ich hab keine ahnung wie ich ein popup oder ein neues fenster in meinem eigenen webbrowser lade irgendwie in: onnewwindow keine ahnung.... weis jemand was?
Einloggen, um Attachments anzusehen!
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Sa 27.08.05 19:31 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.WebBrowser1NewWindow2(Sender: TObject;
  var ppDisp: IDispatch; var Cancel: WordBool);
begin
 ppdisp := webbrowser1;
end;


was soll das mit der exe ? gib gefälligst nen source her, wenn du hilfe willst.

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
zero_cool1986 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 95

MS DOS ;)
D6
BeitragVerfasst: Sa 27.08.05 19:56 
ja sorry tut mir leid... werd mich bessern danke funktioniert prima :roll:
zero_cool1986 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 95

MS DOS ;)
D6
BeitragVerfasst: Sa 27.08.05 20:53 
irgendwie funktioniert das doch nicht richtig wenn ich auf ein link(link soll popup öffnen) klicke dann passiert garnichts hier mal der code:

ausblenden volle Höhe 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:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, OleCtrls, SHDocVw_TLB, Menus, ExtCtrls;

type
  TForm1 = class(TForm)
    WebBrowser1: TWebBrowser;
    Edit1: TEdit;
    Button1: TButton;
    Label1: TLabel;
    MainMenu1: TMainMenu;
    Hilfe1: TMenuItem;
    Lizenz1: TMenuItem;
    Label2: TLabel;
    Button2: TButton;
    Button3: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Edit1KeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
    procedure Lizenz1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure FormResize(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure WebBrowser1NewWindow2(Sender: TObject; var ppDisp: IDispatch;
      var Cancel: WordBool);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

uses Unit2;

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
webbrowser1.Navigate(edit1.text);

end;

procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
if key=vk_return then begin Button1.Click;
end;
end;

procedure TForm1.Lizenz1Click(Sender: TObject);
begin
Form2.show;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
Edit1.Text:='www.google.de';
Button1.click;

end;

procedure TForm1.FormResize(Sender: TObject);
begin
Webbrowser1.ClientHeight:=Form1.ClientHeight-80;
Webbrowser1.Clientwidth:=Form1.Clientwidth-20;
edit1.Width:=form1.Width-100;




end;

procedure TForm1.Button2Click(Sender: TObject);
begin
webbrowser1.GoBack;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
webbrowser1.GoForward;
end;

procedure TForm1.WebBrowser1NewWindow2(Sender: TObject;
  var ppDisp: IDispatch; var Cancel: WordBool);
begin
ppdisp := webbrowser1;



end;

end.
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: So 28.08.05 16:26 
du hast das ereignis onnewwindow2 aber schon beim webbrowser1 im objektinstpektor eingestellt ?
dann weiss ich auch nicht wieso es nicht geht ^^

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...