home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / Runimage / Delphi50 / Demos / FastNet / Url / URLDEM.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1999-08-11  |  2.2 KB  |  68 lines

  1. ///////////////////////////////////////////////////////////////////////////
  2. //                                                                       //
  3. // Copyright ⌐ 1997-1998, NetMasters, L.L.C                              //
  4. //  - All rights reserved worldwide. -                                   //
  5. //  Portions may be Copyright ⌐ Inprise.                                 //
  6. //                                                                       //
  7. // URL Encoder/Decoder Demo Unit 1:  (UNIT1.PAS)                         //
  8. //                                                                       //
  9. // DESCRIPTION:                                                          //
  10. //                                                                       //
  11. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY //
  12. // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE   //
  13. // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR //
  14. // PURPOSE.                                                              //
  15. //                                                                       //
  16. ///////////////////////////////////////////////////////////////////////////
  17. //
  18. // Revision History
  19. //
  20. //                                                                       //
  21. ///////////////////////////////////////////////////////////////////////////
  22. unit urldem;
  23.  
  24. interface
  25.  
  26. uses
  27.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  28.   NMURL, StdCtrls;
  29.  
  30. type
  31.   TForm1 = class(TForm)
  32.     Edit1: TEdit;
  33.     Label1: TLabel;
  34.     Edit2: TEdit;
  35.     Edit3: TEdit;
  36.     Label2: TLabel;
  37.     Label3: TLabel;
  38.     Button1: TButton;
  39.     NMURL1: TNMURL;
  40.     procedure Button1Click(Sender: TObject);
  41.     procedure NMURL1Error(Sender: TObject; Operation, ErrMsg: String);
  42.   private
  43.     { Private declarations }
  44.   public
  45.     { Public declarations }
  46.   end;
  47.  
  48. var
  49.   Form1: TForm1;
  50.  
  51. implementation
  52.  
  53. {$R *.DFM}
  54.  
  55. procedure TForm1.Button1Click(Sender: TObject);
  56. begin
  57.   NMURL1.InputString := Edit1.Text;
  58.   Edit2.Text := NMURL1.Encode;
  59.   Edit3.Text := NMURL1.Decode; 
  60. end;
  61.  
  62. procedure TForm1.NMURL1Error(Sender: TObject; Operation, ErrMsg: String);
  63. begin
  64.   ShowMessage(ErrMsg);
  65. end;
  66.  
  67. end.
  68.