Hi,
I want to save the position of the main window with 'oWnd:nTop' and 'oWnd:nLeft', but although the user has changed the position of the window, the values of 'oWnd:nTop' and 'oWnd:nLeft' didn't change.
What is the right approach?
// saving the WINDOWS-Pos to a INI-File for each user
nPos := oWnd:GetRect()
cCOR1 := ltrim(str(nPos[2]))
cCOR2 := ltrim(str(nPos[3]))
INI oIni FILE cIniFile
oIni:Set("Main", "xPos", cCOR1)
oIni:Set("Main", "yPos", cCOR2)
// ------------------- PROG-Start ----
INI oIni FILE cIniFile
nCOR1 := val(oIni:Get("Main", "xPos", "100")) // Top-Position
nCOR2 := val(oIni:Get("Main", "yPos", "100")) // Left-Position
// nCOR1+160 desired Height of the bar ( Bottom )
// nCOR2+630 desired Width of the bar ( Right )
// -------------------------------------------------------
DEFINE WINDOW oWnd FROM nCOR1, nCOR2 TO nCOR1+160, nCOR2+630 PIXEL
..
..
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 88 guests