Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to find height of toolbars
Message
From
05/01/2005 23:02:01
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00974203
Message ID:
00974596
Views:
26
Here is my code. As I said, I am not worring about the left property yet. "this" = the datecontrol. "this.ocal" stores the calendar form object.
LOCAL lnTotBottom,lnFormWidth , lnTop, lnLeft, lnScreenHeight
WITH this.ocal
	lnTop = OBJTOCLIENT(this,1)
	lnScreenTop = OBJTOCLIENT(thisform,1)
	lnLeft = OBJTOCLIENT(this,2)
	lnScreenLeft = OBJTOCLIENT(thisform,2)
	lnScreenHeight = _screen.Height 
	lnScreenWidth = _screen.Width 
	.left = MIN(lnScreenWidth-.width,lnLeft+lnScreenLeft)
	lnTotBottom =lnScreenHeight - (lnTop+lnScreenTop+this.Height)
	IF lnTotBottom > .height
		.top = MAX(lnTop+lnScreenTop,0)
	ELSE 
		.top = MAX(lnTop+lnScreenTop - this.Height - .height,0)
	ENDIF 
	
ENDWITH 
>>objtoclient(datecontrol,1)+objtoclient(thisform,1) works if there is not a toolbar. Otherwise I am to low about 30 pixels. Thus, how can I find the height of the toolbar. I figure that I have the same issue with the left property but lets take one at a time.
>>
>
>I guess I don't understand exactly what you're doing. I tried this with and without the standard toolbar showing, and although objtoclient returned different results, my code to calculate the top of the form didn't change, whether I used the Top property or objtoclient. I had the toolbar docked at the top of the screen. Where is the toolbar that's causing the problem?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform