Solved

Can Delphi make Netscape's Plugin?

Posted on 1998-12-19
8
518 Views
Last Modified: 2013-11-18
Hi!! I am working on a speech compression scheme on Delphi, and now I need to transfer the code to make netscape's plugin.

From reading the netscape's sdk, it saids the plugin should be make from VC. Can delphi programme a plugin? So that I can save lots of times from translate my code to VC.

Do you have sample code for making these plugins?

regards,
James
0
Comment
Question by:jhui
  • 5
  • 3
8 Comments
 
LVL 4

Expert Comment

by:dwwang
ID: 1352051
Check this site, there is a framework with full source for building netscae plugin by Delphi:
http://ourworld.compuserve.com/homepages/mikes/
0
 

Author Comment

by:jhui
ID: 1352052
I am sorry to reject the answer. It is not exactly the answer's problem. It is the my problem.

I have read the programme and find it is too difficult for me. Can you give me some simpler answer? something like if 2 is feed into the plugin, it will time 3 and output a 6 for display. Anything simple can do.

Since I am asking for extra helps. I increase point by 50.
Thanks.

regards,
James.
0
 
LVL 4

Accepted Solution

by:
dwwang earned 150 total points
ID: 1352053
Hi, don't be terrified by those complex code, it is a evry good framework for building a plugin.

When we say a FRAMEWORK, it means you needn't care about any details in those units, simply inherit the TPluginForm to create your own form, and write the code you want in the form, just like normal Delphi programming.

The most easy way to build your plugin is just use this sample project, the only thing you need to do is to change the name of the form/project/etc.

Below is an example, by simply deleting all the components and procedures from the original test form, then add my own ones to it.

-------------------------------------------------------
unit Test;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, Grids, DBCtrls, DBGrids, ExtCtrls, NPForm;

type
  TPluginTestForm = class(TPluginForm)
    Edit1: TEdit;
    Edit2: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Button1: TButton;
    procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  PluginTestForm: TPluginTestForm;

implementation

{$R *.DFM}

procedure TPluginTestForm.FormCreate(Sender: TObject);
begin
     edit1.Text:='';
     edit2.text:='';
     label3.caption:=''
end;

procedure TPluginTestForm.Button1Click(Sender: TObject);
begin
     label3.Caption:=IntToStr(StrToIntDef(edit1.text,0)*StrToIntDef(edit2.text,0));
end;

initialization
  RegisterPluginForm( '', TPluginTestForm ) ;
end.

it does a simple calculation, such as 2*3=6 :-)

I have never built plugins myself, but with this frame work, I can do it within 5 minutes now!

Regards,
Wang
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1352054
Hi, how are things going? Need more suggestions?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:jhui
ID: 1352055
Thanks for you answer!!

I am still thinking how to use the framework on my speech coompression programme like RealAudio on the Web.

The answer is just slightly different from what I used to think.

regards,
James.
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1352056
Speech compression? Sounds interesting, so is there any difficulties to apply this frame work to you application?
0
 

Author Comment

by:jhui
ID: 1352057
Yes, the project is quite interesting.

Since I want to place the compressed sound clip on a web site, and when user click on the file. The plugin should then decompress it and play it through MCI.

What I am puzzling is the frame work seems like only making the programme work on a browser, so it can only decompress the speech file stored on local harddisk. What I need is to decompress the data from the server and playback on local machine.
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1352058
Oh, I see.

However, as I said, the frame work is the tool for you to programm NS-plugs just like programming normal Delphi Apps. So if you know how to communicate with the server, i.e. receive a datastream via TCP/IP, I think you can put TClientSocket component on the form and then again do what you want to do, as a normal delphi programm.

Hopefully TClientSocket can work within a Netscape browser window :-)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Any way to speed up Selenium? 6 57
proper way to parse text with delphi 7 101
Comparing dates in Delphi. Greater than/ Less than 3 119
Delphi inherited method 6 63
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now