Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to use DDE link to Netscape Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
24-Aug-02
Category
COM+
Language
Delphi 3.x
Views
83
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Tomas Rutkauskas

DDE link to Netscape

Answer:

Create a new application with a form Form1, put the components on it as in the 
following class defined (buttons, edit controls, labels and one TDDEClientConv) and 
link the events to the given procedures. 

Button3 will have Netscape open the entered url. 

1   unit Netscp1;
2   
3   interface
4   
5   uses
6     SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, Forms,
7     Dialogs, StdCtrls, DdeMan;
8   
9   type
10    TForm1 = class(TForm)
11      DdeClientConv1: TDdeClientConv;
12      Button1: TButton;
13      Button2: TButton;
14      Button3: TButton;
15      LinkStatus: TEdit;
16      Label1: TLabel;
17      Label2: TLabel;
18      URLName: TEdit;
19      procedure Button1Click(Sender: TObject);
20      procedure FormCreate(Sender: TObject);
21      procedure Button2Click(Sender: TObject);
22      procedure Button3Click(Sender: TObject);
23    private
24      { private declarations }
25    public
26      { public declarations }
27  
28    end;
29  
30  var
31    Form1: TForm1;
32    LinkOpened: integer;
33  
34  implementation
35  
36  {$R *.DFM}
37  
38  procedure TForm1.Button1Click(Sender: TObject);
39  begin
40    if LinkOpened = 0 then
41    begin
42      DdeClientConv1.SetLink('Netscape', 'WWW_OpenURL');
43      if DdeClientConv1.OpenLink then
44      begin
45        LinkStatus.Text := 'Netscape Link has been opened';
46        LinkOpened := 1
47      end
48      else
49        LinkStatus.Text := 'Unable to make Netscape Link'
50    end
51  end;
52  
53  procedure TForm1.FormCreate(Sender: TObject);
54  begin
55    LinkOpened := 0
56  end;
57  
58  procedure TForm1.Button2Click(Sender: TObject);
59  begin
60    DdeClientConv1.CloseLink;
61    LinkOpened := 0;
62    LinkStatus.Text := 'Netscape Link has been closed'
63  end;
64  
65  procedure TForm1.Button3Click(Sender: TObject);
66  var
67    ItemList: string;
68  begin
69    if LinkOpened <> 0 then
70    begin
71      ItemList := URLName.Text + ',,0xFFFFFFFF,0x3,,,';
72      DdeClientConv1.RequestData(ItemList)
73    end
74  end;
75  
76  end.



			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC