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 15:06:37
 
 
To
15/07/1997 14:43:27
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordan
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00040071
Message ID:
00040082
Views:
50
>>>>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

thanks Vinod...the printers codes are for an HP III.
The function xy_offset is suppose to place a piece text onto
a form in the proper place and it does not work. The way I call the function
is called...
=xy_offset(100,200)
?? 'test'
Can you tell me why this does not work?
thanks..rob
Robert Keith
Independent Developer
San Antonio, Texas
E-mail address:
rebelrob1@yahoo.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform