Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help: Trying to draw onto a form using .PSet() doesn't
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00109321
Message ID:
00109595
Vues:
21
William,

You should report this bug on the MS page http://support.microsoft.com/support/webresponse/pid/selectpid.asp?WRPGMID=5 you may have to sign up for an MS Online ID to get there, they appear to have way broken PSet(). FWIW on my Win95b installation with a Venus AGP video system running at 1280x1024x64k I don't see any display of points until the DrawWidth is set to 2. You might try using: thisform.Line( lnXCoord, lnYCoord, lnXCoord+1, lnYCoord ) instead of PSet()

>I'm experimenting with lower-level graphics and Visual FoxPro 5.0a SVP3 (with Visual Studio Service Pack 3). I'm trying to manually, dynamically, draw shapes and animate them on a VFP form. I'm trying to use the form .Point() and .PSet() methods to accomplish this. My problem is that all of my .PSets are lost and the entire form is repainted uncontrollably. Oddly enough, I can delay the repaint only as long as I am feeding the Windows 95 I/O with mouse or keyboard events while a code loop is running (move the mouse continually while my .PSets are occuring in a loop).
>
>The following snippet illustrates my problem:
>
>- Create a form, make it's .BackColor = RGB(0,0,0)
>- Throw a command button on it and paste the following code into the button's .Click() method:
>
>LOCAL lnSpot, lnXLimit, lnYLimit, lnXCoord, lnYCoord
>lnXLimit = THISFORM.Width
>lnYLimit = THISFORM.Height
>THISFORM.ForeColor = RGB(255,255,255)
>
>FOR lnSpot = 1 TO 2000
> lnXCoord = INT((lnXLimit) * RAND() + 1)
> lnYCoord = INT((lnYLimit) * RAND() + 1)
> THISFORM.PSet(lnXCoord, lnYCoord)
>ENDFOR
>
>- Save your form, run it, and click the command button. You now see my problem. Every point set by .PSet() is cleared uncontrollably.
>
>My question: How do I stop this erratic behavior? I want to manually draw onto the form as though it were a graphic region.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform