Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Drawing lines
Message
De
11/05/2008 09:52:29
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
10/05/2008 05:11:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
01316207
Message ID:
01316291
Vues:
22
>Substituting DOEVENTS for the INKEY() does not work. Only using INKEY() (or probably some other wait state I assume).

>Why?

Gregory answered that, but I'd like to chime in on another side effect of form drawing. The canvas for such drawing is the form's background. If, and what, you manage to draw over the controls, it goes away on next refresh - the controls repaint themselves. Furthermore, if anything causes a scroll (a stray ? command or anyhting) will actually scroll your form's background - and your drawing as well. Just try to insert a thisform.refresh after your drawing, to see how much of it survives. Also, none of it will survive form.cls(), but the controls will.

I used form drawing a lot, for a few uses which had almost no other objects on them - a couple of buttons in a corner, and the drawing was actually the purpose of the form. Mmm...now that my monitors span about (1680+900)x1440, which is 3.5 megapixels, well not quite - there's a 390x1680 rectangle missing ;), I can actually make a form that big and have that old thing much larger... worth a try on a slow day.

For any graphics I wanted on the form, I'd rather use graphic objects based on Line class, Shape class, and/or transparent containers containing lines (which can redraw its own lines on resize, either in code or by anchoring). These are far easier to control than the behind-the-controls drawing methods.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform