PlanningPME vous permet de créer un plugin
Pourquoi faire un plugin PlanningPME ?
Qui peut faire un plug-in PlanningPME ?
1 – Enregistrez la PlanningPME.dll
C:\windows\system32\regsvr32.dll PlanningPME.dll
2 – Créer le plugin avec Visual Basic
Choisir le nom de votre objet, ici Project1
Choisissez le nom de votre classe
ce sera donc: Projet1.plugin
Référencez la dll PlanningPME dans votre projet
Insérez votre code
Const BN_CLICKED = 0
Const WM_COMMAND = 273
Option Explicit
Implements PlanningPMEPlugin
Private Sub PlanningPMEPlugin_InitializeControls(ByVal Controls As PlanningPMEControls)
Dim Control As PlanningPMEControl
Set Control = New PlanningPMEControl
Control.Caption = "My Button update Task"
Control.ID = 5000
Control.x = 350
Control.y = 50
Control.Height = 20
Control.Width = 150
Control.Type = PpControlPushButton
Control.When = PpWhenUpdate
Control.Destination = PpDestinationDoTask
Controls.Add Control
End Sub
Private Sub PlanningPMEPlugin_OnEvent(ByVal Context As PlanningPMEContext)
If Context.Context = PpContextMessage Then
If Context.Loword = 5000 And Context.message = WM_COMMAND And Context.Hiword = BN_CLICKED Then
MsgBox "BN_CLICKED task Key = " & Context.Key
End If
End If
If Context.Context = PpContextTrigger Then
If Context.When = PpWhenInsert Then
MsgBox "Trigger Insert task Key = " & Context.Key
End If
If Context.When = PpWhenUpdate Then
MsgBox "Trigger Update task Key = " & Context.Key
End If
End If
End Sub
Compilez votre projet
3 - Enregistrez votre plugin
C:\windows\system32\regsvr32.dll plugin.dll
4 – Indiquez à PlanningPME dans la base de registre (HKEY_LOCAL_MACHINE) le nom de votre plugin
5 – Lancez PlanningPME
Vous aurez un nouveau bouton dans la tâche
Lectures recommandées sur ce thème :