Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unknown member
Message
De
01/08/2006 11:20:21
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Pro
Database:
Visual FoxPro
Divers
Thread ID:
01142094
Message ID:
01142115
Vues:
17
This message has been marked as the solution to the initial question of the thread.
>hi all, i posted this under tablet oc but i think that i scared people :)
>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. if you copy this code in to a prg and run it it will bring up a
>screen that you can write on even with a mouse. all help/pointers appreciated
>
>
>*-------------------------------------
>*--    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
>
Mark,
I don't have a tablet PC < s > to test this code. But as human I'd react unknown member InkOverlay too:) Would these lines:
       PUBLIC oink As msinkaut.inkoverlay.1
        oInk = NEWOBJECT("msinkaut.inkoverlay.1")


        WITH oInk 
Instead be:
       PUBLIC oink As msinkaut.inkoverlay.1
       oInk = NEWOBJECT("msinkaut.inkoverlay.1")
       this.AddProperty("InkOverlay",oInk)

        WITH oInk 
?
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform