Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Install in every computer Custom Paper Size?
Message
From
27/10/2003 10:54:17
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00840704
Message ID:
00842971
Views:
29
>>Lazy, and yes. Updated accordingly!
>
>Hi Jim,
>
>Here's even shorter version using Ed Rauh's ClsHeap class.
...
>SET PROCEDURE TO clsheap ADDITIVE
>oHeap = NEWOBJECT("heap", "clsheap.fxp")
>* Build FORM_INFO_1 structure
>cForm = NumToLOng(0) + ;		&& Flags
>		NumToLOng(oHeap.AllocString("MyCustomForm")) + ;	&& Form Name
>		NumToLOng(190000) + ;	&& cx
>		NumToLOng(215000) + ;	&& cy
>		NumToLOng(0) + ;	&& Left
>		NumToLOng(0) + ;	&& Top
>		NumToLOng(1900000) + ;	&& Right
>		NumToLOng(215000) 	&& Bottom
>...
>
And using struct.vcx:
SET CLASSLIB TO struct.vcx

* build FORM_INFO_1 structure
ostruct = CREATEOBJECT('forminfo')
ostruct.pName = "MyCustomForm"
ostruct.SIZEL.CX = 190000
ostruct.SIZEL.CY = 215000
ostruct.RECTL.nleft = 0
ostruct.RECTL.ntop = 0
ostruct.RECTL.nright = 190000
ostruct.RECTL.nbottom = 215000

cform = ostruct.GetString()
etc.

DEFINE CLASS PSIZE AS Struct
   cx = 0
   cy = 0
   cMembers = "l:cx, l:cy"
ENDDEFINE

DEFINE CLASS PRECT AS Struct
   nleft = 0
   ntop = 0
   nright = 0
   nbottom = 0
   cMembers = "l:nleft, l:ntop, l:nright, l:nbottom"
ENDDEFINE

DEFINE CLASS forminfo as Struct
  flags = 0
  pName = NULL
  sizel = NULL
  rectl = NULL
  cMembers = "ul:flags, pz:pName, o:sizel, o:rectl"
  
  PROCEDURE init
    this.sizel = CREATEOBJECT("PSIZE")
    this.rectl = CREATEOBJECT("PRECT")
    DODEFAULT()
  ENDPROC  
ENDDEFINE
though I think you may have the shortest/quickest solution...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform