Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel 2000 Chart Size?
Message
From
18/05/2001 05:44:20
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
17/05/2001 18:58:10
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00508544
Message ID:
00508613
Views:
26
>I have created an Excel 2000 chart using VFP 6 and saved it as HTML. The chart looks great on my computer at 1152 by 864. However, the chart is way too big on another computer using an 800 by 600 resolution.
>
>How can I control the output to use the lowest common resolution of 800 by 600?

Tom,
You could set chart object's size to fit on 800*600 resolution. However thinking toolbars, taskbar, HTML title etc what you left is about less than half of height (near 300), you're more free on width and could use near 800.
ChartObject's dimensions ae expressed in points, and sounds area you have is about 500*200 points.
*PixelsToPoints
lparameters tnPixels, tlVertical
#DEFINE TWIPSPERINCH  1440
#DEFINE TWIPSPERPOINT 20
lnPixelsPerInch = _GetPixelsPerInch(tlVertical) 
return ( tnPixels  / lnPixelsPerInch * TWIPSPERINCH / TWIPSPERPOINT )

FUNCTION _GetPixelsPerInch
LPARAMETERS tlVertical
DECLARE INTEGER ReleaseDC IN Win32Api;
	INTEGER nwnd, INTEGER hdc
DECLARE INTEGER GetDeviceCaps IN Win32API;
	INTEGER hdc, INTEGER nIndex
DECLARE INTEGER GetWindowDC IN Win32API;
	INTEGER hWnd

#DEFINE WU_LOGPIXELSX  88
#DEFINE WU_LOGPIXELSY 90
lnDC = GetWindowDC(0)
IF tlVertical       
	lnPixelsPerInch = GetDeviceCaps(lnDC, WU_LOGPIXELSY) &&Vertical
ELSE                
	lnPixelsPerInch = GetDeviceCaps(lnDC, WU_LOGPIXELSX) &&Horizontal
ENDIF
lnDC = ReleaseDC(0, lnDC)
RETURN lnPixelsPerInch
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform