Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VB Picturebox equivilent in VFP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Divers
Thread ID:
00935043
Message ID:
00935530
Vues:
20
Jordon

I downloaded your demo control, and am not getting the desired results. I have posted my modified code to draw inside the FoxPictureBox control. The other commented code draws perfect onto the a form. The purpose of this code is to capture a digital signiture off an ePad-Ink device connected to a workstation and save it as an image file associated with a user account in the database. I'm hoping your people can look at this code and make it peform correctly. If so, you have what I'm looking for I think.

Thanks

Kirk
*****E-Pad ActiveX - FirePadDataEvent  ******
LPARAMETERS abs_x, abs_y, abs_z, ftouch, dwtimestamp, dwseqencenum
LOCAL x,Y
*!* ftouch returns a 1 or 0

*!* This code simply draws a sloping line from to to botton in the foxPictureBox.

x = (thisform.oPicture.WIDTH *  (abs_x - g_xMin)) / (g_xMax - g_xMin)
Y = (thisform.oPicture.HEIGHT * (abs_y - g_yMin)) / (g_yMax - g_yMin)

IF ftouch=0
	g_fFirstTouch = .T.
ELSE
	IF !g_fFirstTouch
		thisform.oPicture.drawLINE(g_lastX,g_lasty,x,y)
	ELSE 
		thisform.oPicture.drawpoint(x,y)
		g_fFirstTouch=.f.
	ENDIF 
ENDIF
g_lastx = x
g_lasty = Y




*** **E-Pad ActiveX - FirePadDataEvent  ******
*!* LPARAMETERS abs_x, abs_y, abs_z, ftouch, dwtimestamp, dwseqencenum
*!* LOCAL x,Y
*!* ftouch returns a 1 or 0

*!*  This code draws a signature a form perfectly.

*!*	x = (thisform.oPicture.WIDTH *  (abs_x - g_xMin)) / (g_xMax - g_xMin)
*!*	Y = (thisform.oPicture.HEIGHT * (abs_y - g_yMin)) / (g_yMax - g_yMin)

*!*	IF ftouch=0
*!*		g_fFirstTouch = .T.
*!*	ELSE
*!*		IF !g_fFirstTouch
*!*			thisform.oPicture.LINE(g_lastx,g_lasty,x,y)
*!*		ELSE 
*!*			thisform.oPicture.PSET(x,y)
*!*			g_fFirstTouch=.f.
*!*		ENDIF 
*!*	ENDIF
*!*	g_lastx = x
*!*	g_lasty = Y
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform