Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where do my forms go?
Message
 
À
31/10/2001 07:57:37
Michael Green
Fountain Head Systems
Knighton, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00575547
Message ID:
00575661
Vues:
33
Hi Michael,

>I feel quite stupid as I'm sure the answer is Dead Simple but, try as I might I can't get my head round this problem.

No need to feel stupid. Not knowing is NOT the same as being stupid. In our VFP training classes I deal with people migrating from FoxPro 2.hard (that's how I refer to 2.x < g >) to VFP all the time. They're not stupid, they just don't know how to effectively work with VFP yet. They DO when I'm done with them though! < s >

Let me take a shot at this. In 2.x you're calling a .SPR program file. Control passes to the .spr from the calling program and stays there until the .spr is terminated then the next line of code in the calling program is executed.

x = 9
DO MYSCREEN.SPR
WAIT WINDOW "HELLO!"

In 2.hard, you won't see the wait window until AFTER the screen is closed by the user.

In VFP, things work differently. Let's use similiar code as above

x = 9
DO FORM MYSCREEN
WAIT WINDOW "HELLO!"

In VFP, the form is loaded and displayed and control continues on through the code that called the form. The form AND the wait window will be displayed at the same time. The only way to mimic the 2.hard methodolgy in this case is to make the form modal (see the WindowType property).

The form is ready to process events that occur on it, say the click code behind an OK button.

That make sense at all?

BTW, are you seeing your form appear? Does it process events like clicking on a command button?

Based on my experience with people migrating from 2.hard to VFP, I KNOW you have more questions. Let's hear 'em.



>I've just converted from 2.6 and I'm developing my first VFP application (5.0) - yes, I know 7.0 is available and I've got it but not yet installed! The advice seems to be that modeless forms are what one should normally use. BUT try as I might I can't get the module to transfer control to a modeless form after I've executed a "DO FORM". It just carries on executing the following code. In 2.6 you said "DO xxxxx.SPR" and the form appeared. What am I failing to do - or failing to understand??? Help please!
Jim Duffy
Microsoft MVP
INETA Speaker
TakeNote Technologies
Developer's Choice Award Winner for Best Training Company
Specializing in VB.NET, ASP.NET, VFP, and SQL Server Training and Development
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform