Let me explain. The form opens using this function (macro) and with the specified dimensions, not dynamic:
.
Resize(1338,580,300,250)
.
What I would like is for this function to become dynamic. For example, if the form was moved or resized on the screen and closed, that it can open (if requested) in the last location when closing it and with the new dimension if it has been resized. Here is the function (found on the internet):
.
Sub Resize(iWidth,iHeight,Optional iXPos,Optional iYPos) As Integer ' Fonction procédant au dimensionnement des divers formulaires
Dim vRect as Object ' RĂ©initialisation de la variable
If IsNull(thisComponent.currentController.Frame) then exit sub ' Si la variable ne contient pas de données alors la fonction se termine
vRect = thisComponent.currentController.Frame.ContainerWindow.PosSize
Wait 200
If IsMissing(iXPos) Then iXPos=vRect.X ' Teste si la fonction est appelée avec un paramÚtre facultatif
If IsMissing(iYPos) Then iYPos=vRect.Y
thisComponent.currentController.Frame.ContainerWindow.setPosSize(iXPos, iYPos, iWidth, iHeight, 15)
Wait 200
thisComponent.currentController.Frame.ContainerWindow.setPosSize(iXPos, iYPos, iWidth, iHeight, 15)
End Sub