Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel 2000 Chart Size?
Message
De
18/05/2001 08:19:05
 
 
À
18/05/2001 05:44:20
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00508544
Message ID:
00508632
Vues:
19
Cetin, thanks for the reply. You are clearly the leading VFP/Excel expert out there in my opinion. I have used several of your ideas to implement Excel automation - things like your recursive GetChar() function come to mind.

In regards to this specific question, I am unsure how to implement a solution that will control the size of the Excel chart that is saved as HTML. In my code all I am doing is using .ActiveWorkbook.SaveAs(lcHTMLName, xlHTML) to save the output. Nowhere in the code do I specify the size of the chart.

Looks like you are providing code to convert from pixels to points, but I do
not know where to set the resulting value in order to control the chart size.
Do you have a code snippet that shows where the size of the chart can be
controlled?

Thanks for all your help!

Tom

>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform