[AccessD] Form Position

Mark A Matte markamatte at hotmail.com
Tue Oct 30 15:16:55 CDT 2007


John,
 
I don't have an example...but I have moved objects and db windows before...for the form itself it should be similar.  The unit of measure will be in "TWIPS".  
 
I would call a function that gets the location of what you clicked on(bottom and left...this will be in twips)...and come up with a small formula(say 25 twips down and 30 twips left...you will have to add and subtract these from/to the location numbers you got above)
 
Now...when your popup opens...use the MOVE method in conjunction with your twip calculations from above.(the WindowLeft or WindowTop properties are read only...but MOVE works.)
 
This should allow you to open a popup anywhere and have it move to your clicking location.
 
Good Luck,
 
Mark A. Matte
 
P.S...When I first started moving stuff like this...I did a little exercise to get a good understanding of what was happening.  I created a form with :  1 button, 1 text box....when I clicked the button...the text box displayed the top left of the textbox in TWIPS.  Then I changed the button to where it found txtbox.topleft...and added 25 twips to it...then displayed in the text box the new number.  Then I did the same thing...moving right and left...and so on.  This way I could see how far each change actually moved my object.  
 
Point of this...I still don't know exactly how big a twip is...and 25 of them is just a nudge.
 
...and if your calculation goes off the screen...db does NOT like it...so use error handling.  
 
Mark> From: john at winhaven.net> To: accessd at databaseadvisors.com> Date: Tue, 30 Oct 2007 13:47:46 -0500> Subject: [AccessD] Form Position> > I would like to have a pop-up form open directly below the icon used to open> it. The pop-up form is used throughout the application and the icon is not> always in the same location on each form. Does anyone have form positioning> code that I could adopt for this?> -- > AccessD mailing list> AccessD at databaseadvisors.com> http://databaseadvisors.com/mailman/listinfo/accessd> Website: http://www.databaseadvisors.com
_________________________________________________________________
Windows Live Hotmail and Microsoft Office Outlook – together at last.  Get it now.
http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=CL100626971033


More information about the AccessD mailing list