[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 296
  • Last Modified:

Button Save Position

My question:
I'm talking about a button (e.g. btnSavePos : TButton) which should be implemented into a Delphi2.0-application in order to give a chance to the user to save the actual window-position of his application so that it would start next time at the same position and with the same window-size as it has at that very moment. How could I program this button?
I know that this is a combination with any of Windows95-properties but how could I use these in my Delphi-application?

0
gthomas
Asked:
gthomas
1 Solution
 
richweedCommented:
You can save the form properties top, left, width & height to the registry and read it back again when you restart the program.

Otherwise you can save them to a configuration file. Personally I prefer this method, but it's up to you!

Do you know how to save text values to disk?

If not, I'll give you some code.

Cheers
Richard
0
 
gthomasAuthor Commented:
Please, Richard, tell me how to save top, left, width and height to the registry or to a configuration file.
TIA
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now