Thank you Javier.
The user ID _is_ saved in the UserParams table in column ParamUserID,
allowing each user to have their own settings. For your item #2, any
form could have the four size and location rows preloaded with userid of
"Default" and the form name in column UserParamFormName which would set
default values for size and location. If any user wanted a custom S&L,
that would be stored for that user and the defaults would still remain
for other users.
A expansion of this concept would be to store parameters for individual
components via ComponentID. Each user could have personal settings (as
allowed by the developer) for, say, background color, zebra stripe,
heck, any property value.
Doug
On 6/27/2016 12:10 PM, Javier Valencia wrote:
Very nice Doug,
The next improvement would be to make the table a part of the working
database and add a User ID so each use can have his/her own settings.
1.Change the table definition to add User ID and default and custom
settings.
2.At startup, if data is not available for that form for that user,
create a record with the default values for the form and the custom
values would be the same.
3.At close form, update the custom setting with the latest values and
the default values are unchanged and always available to reset the
form to the original position-size.
4.Create stored procedures for the open and close form so they can
easily be called from form with one command (items 2 and 3) and no
need to rewrite code.
Now, I need time to implement this feature, but with the items above,
it would be a matter of adding one line to the Open and one to the
Close form EEPs.
Best regards,
*Javier Valencia, PE*
*President*
cid:[email protected]
*Valencia Technology Group, LLC*
14315 S. Twilight Ln.
Suite #14
Olathe, Kansas 66062-4571
913-829-0888 Office
913-915-3137 Cell
913-649-2904 Fax
[email protected] <mailto:[email protected]>
Visit us at: http://www.vtgonline.com <http://www.vtgonline.com/>
*_Confidentiality Notice_*
This electronic mail (including any attachments) may contain
information that is privileged, confidential, and/or otherwise
protected from disclosure to anyone other than its intended
recipient(s). Any dissemination or use of this electronic email or its
contents (including any attachments) by persons other than the
intended recipient(s) is strictly prohibited. If you have received
this message in error, please notify us immediately at 913-829-0888 or
by reply email so that we may correct our internal records. Please
then delete the original message (including any attachments) in its
entirety.
GreenNoFrame
*From:*[email protected] [mailto:[email protected]] *On
Behalf Of *Doug Hamilton
*Sent:* Monday, June 27, 2016 11:01 AM
*To:* R:Base List
*Subject:* [RBASE-L] - SAT Saving Form Size and Position
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,
Doug
p.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!" :)
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=icon>
Virus-free. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=link>
--
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]
<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
--
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]
<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
---
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.