So I have our software running on a terminal server called parallels. Works great except for the ini files. My business partner runs it and he has some weird configuration of his monitors, and a giant monitor, and I have one monitor. So what happens is the ini for the software is the same one, so my screens are in weird places when I sign-on and visa-versa. I’m wondering if there is maybe a slick way of changing the screen ini after login. Maybe renaming it so that the program uses it instead of the standard one. I just don’t know how to make the software use a different .ini than the main one.
Thanks.
In addition to storing the INI in a user profile area, I used to incorporate the monitor dimensions (via GetDeviceCaps) in the INI filename. It didn’t take into account multi monitors, though. For that, you’d want a more robust solution.
I’m using INI files for very few things but my INI files are stored in a self-created user profile folder which is located below the data folder of my app.
I’m storing window positions and sizes in the registry within HKEY_CURRENT_USER.
This approach allows each user to have its own window setup.
Jens
I could be wrong, but it seems to me I can’t set the ini folder until after I’ve logged into the software. It’s not the user as in computer user, it’s the user that we have in the software. Maybe I’m confused here, but when I’m running the program on Parallels, which is like a terminal server, everything including the ini is stored in the same place. That is the problem. On a LAN, the program is running on each computer and sharing the data from the server, but the ini is stored on each computer.
A quick fix may be to save PC specific settings into a section named by computer/host name
In my apps I use:
In main:
If LoginWindow() = False
Return Level:Fatal
Else
IniMgr.Filename = '.\UW_' & CLIP(Glo:MedewerkerID) & '.ini'
!MESSAGE('The current INI file name is: ' & CLIP(INIMgr.Filename))
“UW” are the first char. of the name of this app(Uurwerk)
“Glo:MedewerkerID” = UserID of the user
Maybe it can help.
I’m not suggesting change the .ini filename, I’m suggesting add PC specific sections into the existing .ini to store window or monitor info, that way your settings would not interfere with you colleague’s.
[PCName1]
windowX=
windowY
[PCName2]
windowX=
windowY
