whats new ¦  programming tips ¦  indy articles ¦  intraweb articles ¦  informations ¦  links ¦  interviews
 misc ¦  tutorials ¦  Add&Win Game

Tips (1541)

Database (90)
Files (137)
Forms (107)
Graphic (114)
IDE (21)
Indy (5)
Internet / LAN (130)
IntraWeb (0)
Math (76)
Misc (126)
Multimedia (45)
Objects/
ActiveX (51)

OpenTools API (3)
Printing (35)
Strings (83)
System (266)
VCL (242)

Top15

Tips sort by
component


Search Tip

Add new Tip

Add&Win Game

Advertising

29 Visitors Online


 
...create a simple Delphi Expert?
Autor: Simon Grossenbacher
Homepage: http://www.swissdelphicenter.ch
[ Print tip ]  

Tip Rating (9):  
     


{
Diese Unit kann in ein Package compiliert werden und erscheint danach im
Delphi Menu unter Hilfe.
}

{
This unit can be compiled into a package and will then appear in the delphi
Help menu.
}
unit SDCSimpleExpert;

interface

uses 
ToolsApi;

type
  
TSDCSimpleExpert = class(TNotifierObject, IOTAMenuWizard, IOTAWizard)
  public
    function 
GetIDString: string;
    function GetName: string;
    function GetState: TWizardState;
    procedure Execute;
    function GetMenuText: string;
  end;

procedure Register;

implementation

uses 
Dialogs;

procedure Register;
begin
  
{register expert}
  
RegisterPackageWizard(TSDCSimpleExpert.Create);
end;

{ TSDCSimpleExpert }

procedure TSDCSimpleExpert.Execute;
begin
  
{code to execute when menu item is clicked}
  
ShowMessage('Hello SwissDelphiCenter Simple Expert.');
end;

function TSDCSimpleExpert.GetIDString: string;
begin
  
{unique expert identifier}
  
Result := 'SwissDelphiCenter.SimpleExpert';
end;

function TSDCSimpleExpert.GetMenuText: string;
begin
  
{caption of menu item in help menu}
  
Result := 'SwissDelphiCenter Simple Expert';
end;

function TSDCSimpleExpert.GetName: string;
begin
  
{name of the expert}
  
Result := 'SwissDelphiCenter Simple Expert';
end;

function TSDCSimpleExpert.GetState: TWizardState;
begin
  
Result := [wsEnabled];
end;

end.

 

Rate this tip:

poor
very good


Copyright © by SwissDelphiCenter.ch
All trademarks are the sole property of their respective owners