Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inkoverlay not recognised
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Tablet PC
Title:
Inkoverlay not recognised
Miscellaneous
Thread ID:
01139260
Message ID:
01139260
Views:
67
hi all,
i have included the code below for what i am trying to do. we have a customer that wants to have a signature captured and we were thinking of using a table pc. i am working off 2k for development. i got the code from below from the vfp website. i have the code running up the form perfectly but i have two problems, and i think that they are both related. 1 is when i try to save what i have written on the form i get the error "Unknown member INKOVERLAY", i can write on the screen using my mouse. another problem is that the writable area covers the entire form, there is a procedure that is supposed to limit that area called SetRectangle but at the end of it there is a line "***ThisForm.inkoverlay.SetWindowInputRectangle(oInkRectangle)" that causes a problem giving the error message exactly as above, i have commented it out so the form will run up. this line could be in the wrong place. any help is much appreciated on this.
*-------------------------------------
*--    Program:   InkOl1.prg
*--
*--    Author:    Mike Stewart
*--    Comments:  Simple InkOverlay demo using an InkOverlay class with a recognizer button.
*-------------------------------------
PUBLIC oform1

oform1=NEWOBJECT("InkOverlayDemo1")
oform1.Show
RETURN

DEFINE CLASS InkOverlayDemo1 AS form

    Top = 0
    Left = 0
    Height = 416
    Width = 659
    DoCreate = .T.
    Caption = "Form1"
    Name = "Form1"

    ADD OBJECT inkRecognize AS Commandbutton WITH ;
        Top = 368, ;
        Left = 20, ;
        Caption = "\<Recognize ", ;
        Name = "Inkbutton1"

    ADD OBJECT edtrecognized AS editbox WITH ;
        Height = 121, ;
        Left = 20, ;
        Top = 236, ;
        Width = 589, ;
        Name = "edtRecognized"
	
 
	ADD OBJECT cmdSave AS commandbutton WITH ;
	    Top = 360, ;
	    Left = 357, ;
	    Height = 27, ;
	    Width = 84, ;
	    Caption = "\<Save", ;
	    Name = "cmdSave"

	PROCEDURE cmdSave.Click
	    lsInk = ThisForm.inkoverlay.Ink.Save()
	    STRTOFILE(lsInk, GETFILE("isf"))
	ENDPROC
	
	Procedure SetRectangle
		LOCAL oInkRectangle as MSINKAUT.inkrectangle
		oInkrectangle = NEWOBJECT("msinkaut.inkrectangle")

		*-- Set the bottom of the rectangle
		*-- to be the top of the editbox.
		*-- Doing this means the InkOverlay
		*-- will not overlap our controls.
		oInkRectangle.Bottom = thisform.edtRecognized.Top

		*-- The rest of the dimensions of the
		*-- rectangle will match those of the 
		*-- form.
		oinkrectangle.Top = thisform.Top
		oinkrectangle.Left = thisform.Left
		oinkrectangle.Right = thisform.Width - thisform.Left

		*-- Call the method by passing our InkRectangle
		*-- and we're done.
		****ThisForm.inkoverlay.SetWindowInputRectangle(oInkRectangle)	
	ENDPROC
	

    PROCEDURE Init
        PUBLIC oink As msinkaut.inkoverlay.1
        oInk = NEWOBJECT("msinkaut.inkoverlay.1")


        WITH oInk 
            *-- Point it to the window for which you
            *-- want to capture ink. Because VFP does
            *-- not have hWnds for individual controls,
            *-- this can only be done at the form level.
            .hwnd = thisform.HWnd

            *-- The Attachmode property determines whether the InkOverlay sits in front
            *-- or behind the controls on the form.
            .AttachMode = 1  && IOAM_InFront 
			this.setrectangle

            *-- Set everything before enabling, or else error occurs.
            .enabled = 1
            
            
			*-- Set to collect both ink and gestures
			**** this was set to 2 originally ~M
        	.CollectionMode = 0  && ICM_InkAndGesture 
        ENDWITH
    ENDPROC
ENDDEFINE
Go raibh maith agat

~M
Reply
Map
View

Click here to load this message in the networking platform