[AccessD] Form Position

Rocky Smolin at Beach Access Software rockysmolin at bchacc.com
Tue Oct 30 18:22:13 CDT 2007


Mark:

That's the approach I would use.  But one caveat.  If the target machines'
monitors have different resolutions, the amount to add or subtract relative
to the command button will be different.   The initial x and y deltas would
need to be multiplied by the target monitor's resolution divided by the
design resolution.

Rocky





 	
	

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark A Matte
Sent: Tuesday, October 30, 2007 1:17 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Form Position


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: 
Mark> Tue, 30 Oct 2007 13:47:46 -0500> Subject: [AccessD] Form Position> 
Mark> > I would like to have a pop-up form open directly below the icon 
Mark> used to open> it. The pop-up form is used throughout the 
Mark> application and the icon is not> always in the same location on 
Mark> each form. Does anyone have form positioning> code that I could 
Mark> adopt for this?> -- > AccessD mailing list> 
Mark> AccessD at databaseadvisors.com> 
Mark> http://databaseadvisors.com/mailman/listinfo/accessd> Website: 
Mark> 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=CL10062697
1033
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.12/1098 - Release Date: 10/29/2007
9:28 AM
 





More information about the AccessD mailing list