Tags:BdeDelphiDllsError LoadingMidasType Library

When develop delphi programs, especially the database programs, you have tested the running on your machine and found they works very well. While when you distribute them to the client, you may always found an error of "Error loading type library/DLL". Why? In fact, this is caused by the missing dll files on the client's machine. Since you have installed delphi's develop enviroment on your computer, all the dll files needed have exists in your...

Programming - Delphi

Tags:C BuilderError LoadingMidasType Library

I wrote a multi-tier(Midas) programs. On the client I use the SocketConnection connect to the server. I run my programs in my computer which has C++Builder installed, everything is ok, it connect to the server is very well. While when I distribute it to other client machine, it always shows "Error loading type library / DLL" error. What is the problem?

Answers and solution:
You have to copy the file midas.dll which could be found under...

Programming - C++Builder

Tags:C BuilderTstringlist

A sample to use TStringList in C++Builder. The TStringList is very useful in some cases to manage the text list or objects.

Create a new project, put a button on your form. Double click the button, assign the following codes in its onClick event handler.

void __fastcall TForm1::Button1Click(TObject *Sender)
    //Create a TStringList object and adding text list to it.
    TStringList *pList = new TStringList;
    pList->Add("Here is a sample");

Programming - C++Builder


We have talked many useful attributes and methods of the TWebBrowser in previous articles. Yet when you want to reset the contents in a webbrowser component to be blank, how to do it?

Still, the Navigate method is used to complete this task. Create a new project, add a TWebBrowser and a TButton component to your form. Assign the following codes in the proper places.

procedure TForm1.FormCreate(Sender: TObject) ;

Programming - Delphi


If you want to preview a Microsoft word document in your programs, an easy way is to use the TWebBrowser component as the container. TWebBrowser is the internet explorer engine, you just need to use its navigate method to assign a Word document, it would identify the format automatically. Let us see the codes.

Create a new project, drag a TWebBrowser onto the form. Adding codes as below. Here we assume you have a word document saved in "c:\docuemnts\myword.doc". Of...

Programming - Delphi


We konw that use the TWebBrowser to load a html file is easy by the Navigate funtion. While sometimes we need to load a variant string(html formate of contents) from the memory and show it on the webbrowser. Of course you can do it by saving the string to temporary html file and then loading it. Yet this method seens not so good. Here is a better way to do that, also it could get a faster speed.

Create a new project, drag a TWebBrowser component onto the form...

Programming - Delphi

These effective javascript codes need not to write in a html document. You just copy and then paste them in the browser's address bar, then press enter or click the "goto" button would be ok.

The following codes would extract all the pictures in a web page then roll then on the screen.

javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'...

Programming - JavaScript


To get a webpage's html source code is very easy via the TWebBrowser component. Let us look an example.

Create a new project, drag a TWebBrowser, a TMemo and a TButton component onto the form. Adding codes as below shows.

uses mshtml;

//Loading a page when the program runs
procedure TForm1.FormCreate(Sender: TObject) ;
  WebBrowser1.Navigate('http://codeback.net') ;

//In the OnClick events of button1, adding codes.
procedure TForm1.Button1Click(Sender...

Programming - Delphi


Some ranking sites and search engines like alexa and google always cached a site's index page and store as an image in database for the users searching.

We could have this functino very easy in delphi. In this sample we use the TWebBrowser component to load a webpage, then use a function to capture the contents of the page and save it to an image. Ok, let us see the codes.

uses ActiveX;

//Loading a webpage when the program run.
procedure TForm1.FormCreate(Sender...

Programming - Delphi

More Articles...