Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vfp50 - Do you know about ??CHR(27)+'*p0Y'
Message
From
15/07/1997 14:43:27
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordan
 
 
To
15/07/1997 14:34:03
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00040071
Message ID:
00040079
Views:
48
>>>This is some kind of character code that positions data onto
>>>a FRM file. Does any know how this works? I know you need
>>>to setup some kind of an offset for X and Y coordinates.
>>
>>IMHO, this is a printer code send to printer, If you can remember in days of dos programming, we use to send printer codes through escape character+... to give effects like bold, italics etc.
>>
>>27 is the ascii code for escape..
>
>hi vinod and thanks for answering....Can you tell me what the below code does?
>function xy_offset
* Function for setting offsets
>parameter nx,ny

*passing 2 parameters as row and col i.e. x and y (n because its
numeric)

>private x,y
>xoffset=0

* x offset initialised to 0
>yoffset=0
>x=str(nx+xoffset)

* now in original x value adding the offset & converting it to character type..

>y=str(ny+yoffset)

* same way with y

>?? chr(27)+'*p'+alltrim(x)+'X'

* here it is sending the printer control code, if you know for which printer the code was designed, you can check the manual of the printer that what function printer will do,

if it gets the code chr(27)+"*p"+"12"+'X'

(here 12 I have just taken a value for nx+offset...)
>?? chr(27)+'*p'+alltrim(y)+'Y'
>return
>
>thanks..rob
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform