Welcome! Log In Create A New Profile

Advanced

store the size and the positon of the windows

Posted by Günther 
Günther
store the size and the positon of the windows
June 25, 2009 12:16PM
hello all,

i have a problem!

I work at a small program.
8 employees can data from different computer to import.

the interface can adapt for each employee.

example:
a window displays a table of all the information: name, occupation and address
good for employees A
but employees B need alone the name, not occupation or adress.
i can whit a right click hide the occupation and adress.
but the window displays after each new start again all the information.

by employees C and F saves the program the settings,
but for all other staff will lose the settings.

the solution from my friend

initializtion the project:
InitParameter(paramXML, NoSpace(GLOGebruiker) +".xml")

danke jan:-)

BUT...While there are the files well, and also what is written inside, but the program does not read out again.and now lose employees C and F all settings to.


somebody has an idea?

Al
Re: store the size and the positon of the windows
June 25, 2009 01:42PM
Hello Gunther

If you want to have different settings for your 8 users then you would end up with 8 parameter files.
After the user logs into your app, their user name, should be the source parameter for the parameter file. InitParameter(paramXML, NoSpace(CurrentUserName) +".xml")

Does your parameter NoSpace(GLOGebruiker) +".xml" represent the current user name ?

Regards
Al
günther
Re: store the size and the positon of the windows
June 25, 2009 02:25PM
hi Al,

thanks..

for each user is generated a file and date and time are correct. The values are stored. but the stored datas do not play out.



GLOGebruiker is string = NetworkUser()
InitParameter(paramXML, NoSpace(GLOGebruiker) +".xml")

yes, its represent the current user name

regards
gunny
Al
Re: store the size and the positon of the windows
June 25, 2009 02:40PM
Hello Gunther

It seems you are doing everything right, so maybe the problem is in the fact that you are using the xml option.

I would try again but use the ini file option ?


Regards
Al



Edited 1 time(s). Last edit at 06/25/2009 02:41PM by Al.
günther
Re: store the size and the positon of the windows
June 25, 2009 02:45PM
hello Al,

this is perhaps still a possibility.

I will try
thank you for your help :-)

Regards
gunny
Günther ,
I'm storing the usersettings into the database, to avoid having ini/xml files around. Second, I can delete or even change usersettings for every user (which coul be handy for support reasons), without access to his/her local pc.
And it works at least in WD12.

Extra info:
The settings, stored in a string this way, are still in XML-format.
I found that using xml/string is much faster than ini-files, especially when closing screens with a number of tables/loopers.

Some code snippets:
(Tbl_Employees.PersistentValues is a text-memofield.)

gsUserPersistentValues is string // Note: global var

Load:
IF HReadSeekFirst(Tbl_Employees,EmployeeID,gnEmployee) THEN
gsUserPersistentValues = Tbl_Employees.PersistentValues
END

// USe an exception: in at least one case the XML contained an error.....
WHEN EXCEPTION IN
InitParameter(paramString,gsUserPersistentValues)
DO
gsUserPersistentValues = ""
InitParameter(paramString,gsUserPersistentValues)
END

Save:
Tbl_Employees.PersistentValues = gsUserPersistentValues
IF NOT HModify(Tbl_Employees) THEN
Error("some error")
END


Arie
Günther
Re: store the size and the positon of the windows
June 29, 2009 10:05AM
hey all,...thanks for all coments and help.

I have my program in WinDev 14 compeliert and now it works. hihi

thank you all :-)
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: