The Line method was inflexible and appeared to have trouble with single pixels
(perhaps it was just me screwing it up).
FWIW, I ended up doing the following:
(1) Subclassed Shape to create PixelShape:
BackColor = 0,0,0
BorderStyle = 0
BorderWidth = 1
Height = 1
Width = 1
(2) Created a collection object on the Page, and
looped (with STEP 2) to fill the collection with
PixelShape objects with Top and Left props set.
Setting Visible .T./.F. now just requires a FOR EACH loop.
In all, much more trouble than it was worth -- but
at least I now have my dotted rectangle!
=====================
>You're welcome.
>
>>
>>Thanks -- it was there staring me in the face all the time. Obviously I hadn't had
>>occasion to use the method before.
>>
>>-mark
>>
>>=======================
>>
>>>Hi Mark,
>>>
>>>For simplicity, the code below assumes that you've transparent shape with transparent borders (Shape1) on the form that defines where a dotted border box should be drawn
>>>
>>>WITH Thisform
>>> lnPosX = .Shape1.Left
>>> lnPosY = .Shape1.Top
>>>
>>> FOR i=1 TO .Shape1.Width STEP 2
>>> lnPosX1 = lnPosX + i - 1
>>> lnPosY1 = lnPosY
>>> .Line(lnPosX1, lnPosY1, lnPosX1+1, lnPosY1)
>>> lnPosY2 = lnPosY1+.Shape1.Height-1
>>> .Line(lnPosX1, lnPosY2, lnPosX1+1, lnPosY2)
>>> ENDFOR
>>>
>>> FOR i=1 TO .Shape1.Height STEP 2
>>> lnPosX1 = lnPosX
>>> lnPosY1 = lnPosY + i - 1
>>> .Line(lnPosX1, lnPosY1, lnPosX1+1, lnPosY1)
>>> lnPosX2 = lnPosX1+.Shape1.Width-1
>>> .Line(lnPosX2, lnPosY1, lnPosX2+1, lnPosY1)
>>> ENDFOR
>>>ENDWITH
>>>
>>>
>>>
>>>>Is there a Win API to draw a box with a dotted border EXACTLY like
>>>>what surrounds the caption of a clicked checkbox (such as
>>>>when you just clicked this message)?
>>>>