Solved

Can Delphi make Netscape's Plugin?

Posted on 1998-12-19
8
516 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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

747 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

8 Experts available now in Live!

Get 1:1 Help Now