How to enable the twebbrowser to be editing?
Inface, twebbrowser has a design mode state. It could be set to allow the user to edit the content of a webpage. In delphi, this function is very easy to be called.

See an example.

Create a new object, drag a TWebBrowser onto the form, double click the form and add the following codes to its creat event.

uses MSHTML;
procedure TForm1.FormCreate(Sender: TObject) ;

Programming - Delphi


Webbrowser supports many of the surface to control the browser. This is a sample to show how to insert an image into the current position in the webbrowser component. 

Make a new project, then put a cppwebbrowser and a button to the form.  double click the button, adding the following codes.

void __fastcall TForm1::Button1Click(TObject *Sender)
    IHTMLDocument2*   doc;  
    HRESULT   hr   =  ...

Programming - C++Builder

Tags:C Builder

Sometimes you need to make the webpages  editalbe in your programs. Microsoft have supply a component webbrowser to do this. In c++builder, you could use this component TCppWebbrowser easily.

The function are:

IHTMLDocument2::put_designMode(L"On");//Open the design mode(edit mode)  
IHTMLDocument2::put_designMode(L"Off");//Close the design mode 

For detail, see the below steps.

1. Create a new project in c++builder platform.

2. Drag a CppWebbrowser onto the form from...

Programming - C++Builder

When I running the Microsoft sql server enterprise manager, it raise an error of "SQLDMO has not been registered, please re-run SQL Server setup and  contact  your system administrator." What is the problem. My sql server has already been installed and it runs very well until today.

To solve this problem is an easy way. That is, at the Command prompt, run this command line: regsvr32 sqldmo.dll. Well, notice that if the command can not be successfully executed, then you...

Database - Sql Server

Tags:DelphiNew Url In Custom WindowOnnewwindow2PpdispTwebbrowser

Usually when we open a new URL in our program using TWebBrowser, it runs  the Internet Explorer(or the program which has been registered to be the default browser) and navigate to the new url. This is always not what we want. Following codes shows how to open the new window by ourself's custom window.

proceduer TForm1.FormShow(Sender :TObject);


Programming - Delphi


  Since TWebBrowser is inherited methods from TControl, you may think immediately to use the method 'SetFocus' to make it get the focus. Unfortunately, it does not work. So we have to find out some way else to accomplish this task. I have found three ways to make it focused.

1. The first way need to write a function to get it.

  procedure TForm1.WebBrowserSetFocus;
   if WebBrowser1.Document nil then
    with WebBrowser1.Application as...

Programming - Delphi


Create a new project in Delphi, then put a WebBrowser and two buttons to the form. Double click the form, in the formcrate procedure add the navigate codes. Then double click the button1 and button2, assign proper codes in its onclick handler.

procedure TForm1.FormCreate(Sender: TObject);

procedure TForm1.Button1Click(Sender: TObject);
  with WebBrowser1 do

Programming - Delphi

Tags:C BuilderDelphi

When you build a project, you may get an linking error message similar to above. When get this message, you first to check if your SUIPACK_BCB.LIB have been properly installed. If it did not, reinstall it in the correct position, then the problem would be solved.

Sometimes you did not use this "XXX.LIB" at all, while you still get such an linking error message, why? Now, search the "XXX.LIB" (in this article it was SUIPACK_BCB.LIB) that was included in your unit, then...

Programming - Delphi


404: Not Found

Sorry, but the content you requested could not be found

More Articles...