pro get_boxcorn, x0, y0, x1, y1, qabort, data=data, device=device
;
;HISTORY:
;	Written 1991 by M.Morrison
;	20-Jun-95 (MDM) - Replaced TVRDC calls with calls to CURSOR 
;			  and used the /DOWN switch
;			- Also removed the 0.4 sec wait
;
;
qabort = 0
;
print,'Move cursor to one corner'
;tvrdc, x00, y00, data=data, device=device
cursor, x00, y00, data=data, device=device, /down
if (!err eq 2) then begin
    x1=x00
    y1=y00
    qabort = 1
end else begin
    ;wait, 0.4	;bug in IDL, uses first click in second read
    print,'Move cursor to other corner'
    ;tvrdc, x1, y1, data=data, device=device
    cursor, x1, y1, data=data, device=device, /down
    if (!err eq 2) then qabort = 1
end
;
x0=x00<x1
x1=x00>x1
y0=y00<y1
y1=y00>y1
;
return
end
