Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dotted-border Box
Message
 
 
To
16/04/2009 18:43:04
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01395217
Message ID:
01395268
Views:
94
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)?
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform