Autor Beitrag
Delphi2009lover
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 176



BeitragVerfasst: So 20.09.09 11:44 
Hallo erstmal,

ich hab ein kleines Problem... ich möchte einen Webbrowser in Delphi schreibn. Bloß das Problem ist der Style... wenn ich den Webbrowser dann z.B. unter XP oder Vista starte möchte ich, dass die Button, Checkboxen usw. nicht im 2000 Style sind sondern halt im XP- bzw Vista-Style, also dass sich der Style an das System anpasst. Gibt es da ne möglichkeit, oder brauche ich dafür eine andere Komponente?


Danke schon mal im Vorraus
Dude566
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1592
Erhaltene Danke: 79

W8, W7 (Chrome, FF, IE)
Delphi XE2 Pro, Eclipse Juno, VS2012
BeitragVerfasst: So 20.09.09 12:12 
Warum willst du denn den 2000 Stil, ist doch praktisch das sie sich dem OS anpassen.

_________________
Es gibt 10 Gruppen von Menschen: diejenigen, die das Binärsystem verstehen, und die anderen.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19341
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 20.09.09 12:39 
Lade einfach die explorer.exe wie eine DLL beim Programmstart mit LoadLibrary und gib die am Ende wieder mit FreeLibrary frei.

user profile iconDude566 hat folgendes geschrieben Zum zitierten Posting springen:
Warum willst du denn den 2000 Stil, ist doch praktisch das sie sich dem OS anpassen.
Genau das passiert ohne diesen Trick ja gerade nicht. ;-)
Delphi2009lover Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 176



BeitragVerfasst: So 20.09.09 17:59 
asso ich hab mich fast ausgedrückt... ich möchte ja grad nicht den Win 2000 Style.

Ich benutze das Webbrowser - Control und wenn ich dann compiler, mit dem Code übrigends

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:
unit Unit4;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, OleCtrls, SHDocVw;

type
  TForm4 = class(TForm)
    WebBrowser1: TWebBrowser;
    procedure FormCreate(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form4: TForm4;

implementation

{$R *.dfm}

procedure TForm4.FormCreate(Sender: TObject);
begin
Webbrowser1.Navigate('www.google.de');
end;

end.


dann sieht das so aus
Einloggen, um Attachments anzusehen!
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19341
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 20.09.09 18:02 
user profile iconDelphi2009lover hat folgendes geschrieben Zum zitierten Posting springen:
asso ich hab mich fast ausgedrückt... ich möchte ja grad nicht den Win 2000 Style.
Habe ich doch auch schon richtig gestellt. Und die Lösung auch gepostet. :nixweiss:
Delphi2009lover Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 176



BeitragVerfasst: So 20.09.09 19:16 
achso ok sry
Dude566
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1592
Erhaltene Danke: 79

W8, W7 (Chrome, FF, IE)
Delphi XE2 Pro, Eclipse Juno, VS2012
BeitragVerfasst: So 20.09.09 20:25 
user profile iconjaenicke hat folgendes geschrieben Zum zitierten Posting springen:
Lade einfach die explorer.exe wie eine DLL beim Programmstart mit LoadLibrary und gib die am Ende wieder mit FreeLibrary frei.

user profile iconDude566 hat folgendes geschrieben Zum zitierten Posting springen:
Warum willst du denn den 2000 Stil, ist doch praktisch das sie sich dem OS anpassen.
Genau das passiert ohne diesen Trick ja gerade nicht. ;-)


Oh da habe ich mich wohl verlesen, ich dachte er wollte den 2000 Look.

_________________
Es gibt 10 Gruppen von Menschen: diejenigen, die das Binärsystem verstehen, und die anderen.
Dude566
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1592
Erhaltene Danke: 79

W8, W7 (Chrome, FF, IE)
Delphi XE2 Pro, Eclipse Juno, VS2012
BeitragVerfasst: Sa 10.10.09 15:41 
user profile iconjaenicke hat folgendes geschrieben Zum zitierten Posting springen:
Lade einfach die explorer.exe wie eine DLL beim Programmstart mit LoadLibrary und gib die am Ende wieder mit FreeLibrary frei.


Wie lade ich das denn?

So?
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
var
beispiel : THandle;

beispiel := LoadLibrary('explorer.exe');

freelibrary(beispiel);

_________________
Es gibt 10 Gruppen von Menschen: diejenigen, die das Binärsystem verstehen, und die anderen.


Zuletzt bearbeitet von Dude566 am Sa 10.10.09 15:48, insgesamt 1-mal bearbeitet
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19341
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 10.10.09 15:44 
Wo ist dabei das Problem? So viele Parameter hat LoadLibrary doch wahrlich nicht. :lol:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
type
  TFormX = class(TForm)
  ...
  private
    MyExplorer: THandle;
  end;

...
 
procedure TFormX.FormCreate(Sender: TObject);
begin
  MyExplorer := LoadLibrary('explorer.exe');
end;
 
procedure TFormX.FormDestroy(Sender: TObject);
begin
  FreeLibrary(MyExplorer);
end;
Dude566
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1592
Erhaltene Danke: 79

W8, W7 (Chrome, FF, IE)
Delphi XE2 Pro, Eclipse Juno, VS2012
BeitragVerfasst: Sa 10.10.09 15:55 
Sieht aber trotzdem noch wie vorher aus.
Siehe Anhang
Einloggen, um Attachments anzusehen!
_________________
Es gibt 10 Gruppen von Menschen: diejenigen, die das Binärsystem verstehen, und die anderen.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19341
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 10.10.09 15:57 
Ich sehe auch keine WebBrowser Komponente...

Für das Aussehen der normalen Komponenten reicht ein normales XP Manifest bzw. die bei Delphi mitgelieferte Komponente TXPManifest...
Dude566
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1592
Erhaltene Danke: 79

W8, W7 (Chrome, FF, IE)
Delphi XE2 Pro, Eclipse Juno, VS2012
BeitragVerfasst: Sa 10.10.09 15:59 
Achso ich dachte das gilt allgemein für eine Anwendung, habe mich bisher nicht groß um das Ausehen meiner Programme gekümmert. :roll: :oops:

_________________
Es gibt 10 Gruppen von Menschen: diejenigen, die das Binärsystem verstehen, und die anderen.