Syntax

code

Function: Handle: HResult;

Description

Gets the handle of the current PlanSwift application.

Code Reference

  • 1. Create a New Form application
  • 2. Add a button to the form
  • 3. add Planswift to reference (Planswift9_tlb in the uses)
  • 4. copy code to button onclick event

code

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

procedure TForm1.psHandle(Sender: TObject);

var

  ps: IPlanSwift;

  h: Integer;

begin

//Create Planswift Interface

 ps := coPlanswift.Create;

 //Get Planswift window Handle

 h := ps.Handle;

 //Minimize/Maximize Planswift

 ShowWindow(h, SW_RESTORE);

 //Free Planswift Interface

 ps := nil;

 

end;