C'est peut-être un peu lourd comme méthode mais tu peeut enregistrer sa position dans un fichier ini par exemple et la rappeler au démarrage.
Par exemple:
Private Declare Function WritePrivateProfileString Lib "kernel32" _
Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, _
ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
Private Declare Function GetPrivateProfileString Lib "kernel32" _
Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, _
ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString _
As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
Public Sub EcrireIni(stSection As String, stKey As String, stValeur As String, stFichier As String)
WritePrivateProfileString stSection, stKey, stValeur, stFichier
End Sub
Public Function LireIni(stSection As String, stKey As String, stFichier As String) As String
Dim stBuf As String, lgBuf As Long, lgRep As Long
stBuf = Space$(255)
lgBuf = 255
lgRep = GetPrivateProfileString(stSection, stKey, "", stBuf, lgBuf, stFichier)
LireIni = Left$(stBuf, lgRep)
End Function
Private Sub Form_Load()
Me.Width = LireIni("Form", "largeur", App.Path & "\position.ini")
Me.Height = LireIni("Form", "hauteur", App.Path & "\position.ini")
Me.Left = LireIni("Form", "posX", App.Path & "\position.ini")
Me.Top = LireIni("Form", "posY", App.Path & "\position.ini")
End Sub
Private Sub Form_Unload(Cancel As Integer)
Call EcrireIni("Form", "largeur", CStr(Me.Width), App.Path & "\position.ini")
Call EcrireIni("Form", "hauteur", CStr(Me.Height), App.Path & "\position.ini")
Call EcrireIni("Form", "posX", CStr(Me.Left), App.Path & "\position.ini")
Call EcrireIni("Form", "posy", CStr(Me.Top), App.Path & "\position.ini")
End Sub