Home > Back-end >  Twebbrowser. What document into?
Twebbrowser. What document into?

Time:10-02

Has a friend ever using twebbrowser to browse the local disk file? Such as twebbrowser. Navgate2 (' d: \ '); I now there is a pressing problem is? That is:
When using twebbrowser to browse a local file? Twebbrowser. What document into? Ishellview or ifolderview?

Now plans to use twebbrowser to do a simple resource manager, don't know how to get necessary information from twebbrowser,

What a good friend of one second, hope to share their experiences,

Thanks,

CodePudding user response:

This really don't know, I've come to water

CodePudding user response:

Can only help you pour it,

 unit Unit1; 

Interface

USES the
Winapi. Windows, Winapi Messages, System. SysUtils, System. Variants, System. Classes, Vcl. Graphics,
The Vcl. Controls, Vcl. Forms, Vcl. Dialogs, Vcl. OleCtrls, SHDocVw, Winapi. ActiveX, System.Win.Com Obj, Winapi. ShlObj,
The Vcl StdCtrls, Winapi.Com mCtrl;

Type
TForm1=class (TForm)
WebBrowser1: TWebBrowser;
For: TButton;
Edit1: TEdit;
Procedure FormCreate (Sender: TObject);
Procedure Button1Click (Sender: TObject);
Private
{Private declarations}
Public
{Public declarations}
end;

Var
Form1: TForm1;

Implementation

{$R *. DFM}

Procedure TForm1. Button1Click (Sender: TObject);
Var
Sb: IShellBrowser;
Sv: IShellView;
The begin
Sb:=IShellBrowser (SendMessage (WebBrowser1. Handle, WM_USER + 7, 0, 0));
If Succeeded (sb. QueryActiveShellView (sv)) then
The begin
Sv. Refresh;
end;
end;

Procedure TForm1. FormCreate (Sender: TObject);
The begin
WebBrowser1. Navigate (' c: \ ');
end;

End.

CodePudding user response:

Thank you for good friend comment, benefit,

CodePudding user response:

Look not to understand, know from that?
  • Related