Information générale
Catégorie:
Gestionnaire d'écran & Écrans
>Hi,
>I wanted to display a form for data entry. I found that I needed to enable my menus and thus I had to make the form modeless. However, when I called DO FORM, the form just momentarily appeared and then disappeared. Help. What should I do?
>I am porting on old FP 2.x program into VFP5.0 / VFP6.0.
>Any reply would be a great help!
>Thanks
>Ian
let me know how you fixed this. i am in a situation very similar to yours. i am moving a 2.6 to 5.0. everytime i "do form" on a modeless form, it also immediately starts the unload code. i usually do a "do form formxxx name _formxxx linked" for my modal forms. this way i can reference _formxxx in procedure code (i.e. - on key esc _formxxx.release). someone said something about "linked to a variable that is out of scope". maybe my _formxxx needs to be declared "public _formxxx". also maybe my linked should be "linked formxxxvar" and also declared "public formxxxvar". do not know.
anyway - i solved my problem by saving the form as a class (selection from the file menu) into a class library. then in code:
public oformxxx
oformxxx=CREATEOBJECT("formxxx")
oformxxx.SHOW(2)
with oformxxx
.visible = .t.
.alwaysontop = .t.
endwith
obviously you still need a "read events", but this makes the form continue to stay active while you wait on your read events.
brenda
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement