Hi All -One of my questions at the SAT was about the ability to save user's form size and position; most notable is the example of four simultaneous MDI forms. At this time, it would require RBase mucking around in the registry which, understandably, is becoming more security sensitive.
Attached is the table definition and sample form for saving form size and location using a form's Caption Buttons.
To install, first create a separate test folder, then run UserParams.TBL to create a one table db, then load the CaptionButtons form. I left the installation as separate files so you could edit and install on your own db (with all the usual disclaimers: use at your own risk, test first, not guaranteed or warrantied, your mileage may vary,avoid contact with skin.)
In the form, there are OnAfterStart and OnClose form EEPs plus 1 EEP each for the caption buttons /Save/ and /Mine/. When user clicks the /Save/ caption button, it saves the current size and location of the form in the UserParams table for the next time the form is initiated. The form can be temporarily moved/resized and then set back to its preferred position by clicking the /Mine/ caption button.
The size and location data is stored in the UserParams table. I've preloaded it with four rows of documentation data. This is done in 9.5, but I think I originally did it in 7.6. I'm sure it'll work in X.
Improvements:Move the OnAfterStart and OnClose EEPs to a Stored Procedure or RUN SELECT table.
Use alpha blend on startup to hide the form while it is being relocated. Add a Clear button to delete user/form parameters.As they used to say in our physics books, "That is left as an exercise for the reader".
Enjoy, Dougp.s. As someone said after I told them about all the samples and code from the Monroeville SAT , "What were they thinking? That's like giving matches to a pyro!" :)
--- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus -- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
SET QUOTES=NULL SET QUOTES=' SET DELIMIT=NULL SET DELIMIT=',' SET LINEEND=NULL SET LINEEND='รพ' SET SEMI=NULL SET SEMI=';' SET PLUS=NULL SET PLUS='+' SET SINGLE=NULL SET SINGLE='?' SET MANY=NULL SET MANY='*' SET IDQUOTES=NULL SET IDQUOTES='`' SET CURRENCY '$' PREF 2 B DISCONNECT SET STATICDB OFF SET ROWLOCKS ON SET FASTLOCK OFF CREATE SCHEMA AUTHOR CaptBtns PUBLIC CREATE TABLE `UserParams` + (`ParamUserID` TEXT (16), + `UserParamFormName` TEXT (24), + `UserParamName` TEXT (24), + `UserParamValue` TEXT (64)) SET CASE OFF SET AUTOSKIP ON SET REVERSE ON SET BELL OFF SET NULL '-0- ' SET DATE YEAR 26 SET DATE CENTURY 19 SET DATE SEQUENCE MMDDYYYY SET TIME SEQUENCE HHMMSS SET TOLERANCE 0. SET ZERO OFF LOAD `UserParams` NONUM 'LookUp',-0-,'fvFormTop','Position of Top of Form in pixels' 'LookUp',-0-,'fvFormLeft','Position of Left side of Form in pixels' 'LookUp',-0-,'fvFormHeight','Height of Form in pixels' 'LookUp',-0-,'fvFormWidth','Width of Form in pixels' END SET DATE FORMAT 'MM/DD/YY' SET TIME FORMAT 'HH:MM:SS' SET DATE SEQUENCE MMDDYY SET TIME SEQUENCE HHMMSS COMMENT ON TABLE `UserParams` IS 'Table of User-specific data'
CaptBtns_Form_CaptionButtons.LOB
Description: Binary data
CaptBtns_Form_CaptionButtons.frm
Description: Binary data

