Autor Beitrag
Gambit
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 36



BeitragVerfasst: So 06.07.03 14:35 
Moinsen,

ich habe ein Programm geschrieben, in dem das WebBrowser Objekt benutzt wird. Das funzt auch alles soweit. Den WebBrowser selber brauche ich aber nur intern und er soll auf meiner Form gar nicht sichtbar sein. WebBrowser.visible:= false funzt nicht, er wird trotzdem als weiße Fläche angezeigt. Weiß jemand, wie ich ihn trotzdem "weg" bekomme?

Gruß

Wolle
Moritz M.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: So 06.07.03 14:49 
Du könntest ihn sehr sehr klein machen und aus der Form schieben oder dich in die DrawFunktion reinklinken und alles gemalte nicht malen. 8)
Gambit Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 36



BeitragVerfasst: So 06.07.03 15:00 
Jo, das hab ich nu auch so gemacht, aus der Form geschoben. Dann die entstehende Scrollbar auf unvisible gesetzt. Sieht jetzt auch ganz gut aus, hab aber irgendwie son komisches Gefühl dabei. So ganz astrein ist das wohl programmiertechnisch nicht, was?

Gambit
Moritz M.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: So 06.07.03 15:04 
Nein, richtig Sauber ist es nicht.
Aber der Zweck heiligt die Mittel.

(Bei einer Programmierfirma wärste durchgefallen)
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: So 06.07.03 16:37 
ShowWindow(Webbrowser1.Handle, SW_HIDE);
Moritz M.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: So 06.07.03 16:41 
Stimmt. Hmpf
Ich vergess immer, dass es diese Funktion gibt... :oops:
Gambit Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 36



BeitragVerfasst: So 06.07.03 16:46 
Hmm, ich hatte mal beim Start der Form Webbrowser.hide angegeben aber dann funzte das Programm nicht mehr, also es wurde irgendwie keine Seite aufgerufen. Aber ich werds nachher mal so probieren...


Gambit
Gambit Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 36



BeitragVerfasst: So 06.07.03 16:55 
Jepp, funzt! Einbauen im OnActivate Ereignis der Form und alles ist gut. Besten Dank!

Gambit
FriFra
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 557

Win XP Prof, Win XP Home,Win Server 2003,Win 98SE,Win 2000,Win NT4,Win 3.11,Suse Linux 7.3 Prof,Suse Linux 8.0 Prof
D2k5 Prof, D7 Prof, D5 Standard, D3 Prof, K3 Prof
BeitragVerfasst: Mo 14.07.03 21:17 
:!: Der TWebBrowser muss einmal visible im Vordergrund gewesen sein um zu funktionieren!

:x Das Problem habe ich auch... bei mir ist ein TWebBrowser auf einem verdekten TabControl eines PageControl... Ich lade OnCreate eine Webseite in den TWebBrowser. Wenn ich versuche ein JavaScript der entspr. Webseite aufzurufen, bevor ich den WebBrowser wenigstens einmal kurz im Vordergrund hatte (egal wie lange das Programm schon läuft!), bekomme ich einen OLE-Fehler... den TabControl kurz nach vorn und wieder zurück Klicken bringt da abhilfe :evil: :?: ...
Dieser Verhalten erklärt übrigens auch, warum ShowWindow(Webbrowser1.Handle, SW_HIDE); nichts bringen kann :? ...

_________________
Michael
(principal certified lotus professional - developer)
Gambit Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 36



BeitragVerfasst: Mo 14.07.03 23:09 
Ne, bei mir funzt das jetzt so.

Gambit
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: Mi 16.03.05 18:20 
user profile iconFriFra hat folgendes geschrieben:
:!: Der TWebBrowser muss einmal visible im Vordergrund gewesen sein um zu funktionieren!

:x Das Problem habe ich auch... bei mir ist ein TWebBrowser auf einem verdekten TabControl eines PageControl... Ich lade OnCreate eine Webseite in den TWebBrowser. Wenn ich versuche ein JavaScript der entspr. Webseite aufzurufen, bevor ich den WebBrowser wenigstens einmal kurz im Vordergrund hatte (egal wie lange das Programm schon läuft!), bekomme ich einen OLE-Fehler... den TabControl kurz nach vorn und wieder zurück Klicken bringt da abhilfe :evil: :?: ...
Dieser Verhalten erklärt übrigens auch, warum ShowWindow(Webbrowser1.Handle, SW_HIDE); nichts bringen kann :? ...


Rufe vor dem Navigate() Webbrowser1.HandleNeeded(); auf.