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



BeitragVerfasst: So 07.06.09 19:13 
Hi ,

ich wollte einen Webbrowser schreiben, aber das TWebbrowserControl verwenden. Wenn ich jetzt aber z.B. GOOGLE.DE aufrufe, sehen die Buttons aus wie bei Windows 2000 oder so.

Wie kann ich es schaffen, dass die Buttons ganz normal aussehen (bei Vista wie Vista-Buttons usw)

Brauche ich dafür ein anderes Control?

Danke schonmal im Vorraus.


Sry hab noch net so viel Ahnung, bin erst 13 und kann grad so du Grundsätze von Delphi
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: So 07.06.09 20:45 
Wahrscheinlich sehen auch normale Buttons so aus, was du dann brauchst ist ein Suche in: Delphi-Forum, Delphi-Library TXPMANIFEST bzw. die Unit Suche in: Delphi-Forum, Delphi-Library XPMAN

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 07.06.09 20:50 
Das nutzt nichts was den Webbrowser angeht. Ich weiß allerdings auch nicht wie das da geht.

// EDIT:
Ist aber sehr einfach zu finden wie das geht...
lmgtfy.com/?q=webbrowser+xp+style
www.activevb.de/rubr...kol_18/xpthemes.html
Das funktioniert.
Zitat:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
Private hModule As Long

Private Sub Form_Initialize()

    hModule = LoadLibrary("explorer.exe")
    
End Sub

Private Sub Form_Terminate()

    If hModule Then
    
        Call FreeLibrary(hModule)
        
    End If
    
End Sub
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: So 07.06.09 21:23 
Oder du implementierst IDocHostUIHandler (wie z.B. TEmbeddedWB) und setzt bei dwFlags den Flag DOCHOSTUIFLAG_THEME

msdn.microsoft.com/e...aa770044(VS.85).aspx
Delphi2009lover Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 176



BeitragVerfasst: Mo 08.06.09 18:13 
Ok ich habe Delphi 2009 Architekt. Die Form ist im Vista Style, aber die im Webbrowser angezeigten Elemente nicht
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Di 09.06.09 00:52 
Ja, ich hab ja gepostet wie das geht. Du lädst wie in dem VB-Beispiel explorer.exe via LoadLibrary bei der Erzeugung des Formulars und endlädst es, wenn das Formular wieder zerstört wird. Also in FormCreate und FormDestroy.

Oder du nimmst user profile icontoms Lösung, die aber etwas mehr Aufwand bedeutet.
Delphi2009lover Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 176



BeitragVerfasst: Do 11.06.09 10:32 
Ok sryi ich hab leider noch nicht sehr viel Ahnung, kann mir jemand den Code vielleicht in Delphi schreiben. Und ist mit explorer.exe die Taskbar gemeint???
Bernhard Geyer
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 721
Erhaltene Danke: 3



BeitragVerfasst: Do 11.06.09 17:28 
Nimm mal den EmbeddedWB (www.bsalsa.com/). Ist ein modernerer Wrapper um das IE-Steuerelement).
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Do 11.06.09 18:29 
user profile iconDelphi2009lover hat folgendes geschrieben Zum zitierten Posting springen:
Und ist mit explorer.exe die Taskbar gemeint???
Nein, der Windows Explorer.

user profile iconDelphi2009lover hat folgendes geschrieben Zum zitierten Posting springen:
Ok sryi ich hab leider noch nicht sehr viel Ahnung, kann mir jemand den Code vielleicht in Delphi schreiben.
Du musst das doch nur in Delphi genauso schreiben... :roll:
Dort musst du wie gesagt die Events OnCreate und OnDestroy des Formulars verwenden, die OnInitialize und OnTerminate in Visual Basic entsprechen.
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:
type
  TFormX = class(TForm)
    MyWebBrowser: TWebBrowser;
    procedure FormDestroy(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
    ExplorerHandle: THandle;
  public
    { Public declarations }
  end;

...

procedure TFormX.FormCreate(Sender: TObject);
begin
  ExplorerHandle := LoadLibrary('explorer.exe');
end;

procedure TFormX.FormDestroy(Sender: TObject);
begin
  FreeLibrary(ExplorerHandle);
end;