HELP VFP 7.0 Simple Question 
Author Message
 HELP VFP 7.0 Simple Question

VFP7

I created an Form based Object named "employee_namefield_form"
I then turned Windowstate to Modal, or Modeless...
I then use the code in a click event of a button:

mike = CREATEOBJECT("employee_namefield_form")
mike.show

I expect the Window to take focus, and stop execution on the Function bellow
it...  But it doesnt seem to stop execution because the click event exits,
thus closing my window... I thought Windowstate Modal was suppose to stop
execution, but it doesnt... so What do I do to stop execution until the
"mike" form close?



Sun, 27 Nov 2005 01:09:37 GMT  
 HELP VFP 7.0 Simple Question
from the help: [FormSet.]Object.Show([nStyle])Parameters
  nStyle
  Determines how a form is shown. The following values are valid:
        Value Description
        1 Modal. No user input (keyboard or mouse) can occur in any other
form or in the menu until the modal form is hidden or released. The program
must hide or release a modal form (usually in response to some user action)
before further user input can occur. Although other forms in your
application are disabled when a modal form is displayed, other applications
are not.
        2 (Default) Modeless. Code that occurs after the Show method is run
as it is encountered.

  If you omit nStyle, the form is shown in the style specified by the
WindowType property.

Remarks

Quote:
> VFP7

> I created an Form based Object named "employee_namefield_form"
> I then turned Windowstate to Modal, or Modeless...
> I then use the code in a click event of a button:

> mike = CREATEOBJECT("employee_namefield_form")
> mike.show

> I expect the Window to take focus, and stop execution on the Function
bellow
> it...  But it doesnt seem to stop execution because the click event exits,
> thus closing my window... I thought Windowstate Modal was suppose to stop
> execution, but it doesnt... so What do I do to stop execution until the
> "mike" form close?



Sun, 27 Nov 2005 08:05:40 GMT  
 HELP VFP 7.0 Simple Question
The issue has to do with the a Property on the form... I dont know which
one, but if its enabled you become instnatly screwed without any chance of
modal

Mike


Quote:
> from the help: [FormSet.]Object.Show([nStyle])Parameters
>   nStyle
>   Determines how a form is shown. The following values are valid:
>         Value Description
>         1 Modal. No user input (keyboard or mouse) can occur in any other
> form or in the menu until the modal form is hidden or released. The
program
> must hide or release a modal form (usually in response to some user
action)
> before further user input can occur. Although other forms in your
> application are disabled when a modal form is displayed, other
applications
> are not.
>         2 (Default) Modeless. Code that occurs after the Show method is
run
> as it is encountered.

>   If you omit nStyle, the form is shown in the style specified by the
> WindowType property.

> Remarks


> > VFP7

> > I created an Form based Object named "employee_namefield_form"
> > I then turned Windowstate to Modal, or Modeless...
> > I then use the code in a click event of a button:

> > mike = CREATEOBJECT("employee_namefield_form")
> > mike.show

> > I expect the Window to take focus, and stop execution on the Function
> bellow
> > it...  But it doesnt seem to stop execution because the click event
exits,
> > thus closing my window... I thought Windowstate Modal was suppose to
stop
> > execution, but it doesnt... so What do I do to stop execution until the
> > "mike" form close?



Tue, 29 Nov 2005 02:54:48 GMT  
 HELP VFP 7.0 Simple Question
I think it has to do with The AutoTop or AutoCenter, for I disabled these 2
and it works...



Quote:
> Hi Mike
>   I created 2 forms Test1 and Test2 which I saved as class test2. Test1
has
> the following code in the click event of a button.
> SET CLASSLIB TO Test2
> mike = CREATEOBJECT("Test2")
> mike.show

> WAIT WINDOW "This is after the createobject"

> As long Form2  WindowType is Modal it works as expected. You don't see the
> WAIT WINDOW until you close the form. If Test2 is not modal, then
execution
> will not stop and you see the WAIT WINDOW right away.

> Mark Barnard
> Microsoft Support Services

> I've been "encouraged" to share this helpful information from our lawyers.
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> You assume all risk for your use. ? 2003 Microsoft Corporation. All rights
> reserved

> --------------------

> >VFP7

> >I created an Form based Object named "employee_namefield_form"
> >I then turned Windowstate to Modal, or Modeless...
> >I then use the code in a click event of a button:

> >mike = CREATEOBJECT("employee_namefield_form")
> >mike.show

> >I expect the Window to take focus, and stop execution on the Function
> bellow
> >it...  But it doesnt seem to stop execution because the click event
exits,
> >thus closing my window... I thought Windowstate Modal was suppose to stop
> >execution, but it doesnt... so What do I do to stop execution until the
> >"mike" form close?



Sun, 27 Nov 2005 02:34:57 GMT  
 HELP VFP 7.0 Simple Question
from the help: [FormSet.]Object.Show([nStyle])Parameters
  nStyle
  Determines how a form is shown. The following values are valid:
        Value Description
        1 Modal. No user input (keyboard or mouse) can occur in any other
form or in the menu until the modal form is hidden or released. The program
must hide or release a modal form (usually in response to some user action)
before further user input can occur. Although other forms in your
application are disabled when a modal form is displayed, other applications
are not.
        2 (Default) Modeless. Code that occurs after the Show method is run
as it is encountered.

  If you omit nStyle, the form is shown in the style specified by the
WindowType property.

Remarks

Quote:
> VFP7

> I created an Form based Object named "employee_namefield_form"
> I then turned Windowstate to Modal, or Modeless...
> I then use the code in a click event of a button:

> mike = CREATEOBJECT("employee_namefield_form")
> mike.show

> I expect the Window to take focus, and stop execution on the Function
bellow
> it...  But it doesnt seem to stop execution because the click event exits,
> thus closing my window... I thought Windowstate Modal was suppose to stop
> execution, but it doesnt... so What do I do to stop execution until the
> "mike" form close?



Sun, 27 Nov 2005 08:05:40 GMT  
 HELP VFP 7.0 Simple Question
The issue has to do with the a Property on the form... I dont know which
one, but if its enabled you become instnatly screwed without any chance of
modal

Mike


Quote:
> from the help: [FormSet.]Object.Show([nStyle])Parameters
>   nStyle
>   Determines how a form is shown. The following values are valid:
>         Value Description
>         1 Modal. No user input (keyboard or mouse) can occur in any other
> form or in the menu until the modal form is hidden or released. The
program
> must hide or release a modal form (usually in response to some user
action)
> before further user input can occur. Although other forms in your
> application are disabled when a modal form is displayed, other
applications
> are not.
>         2 (Default) Modeless. Code that occurs after the Show method is
run
> as it is encountered.

>   If you omit nStyle, the form is shown in the style specified by the
> WindowType property.

> Remarks


> > VFP7

> > I created an Form based Object named "employee_namefield_form"
> > I then turned Windowstate to Modal, or Modeless...
> > I then use the code in a click event of a button:

> > mike = CREATEOBJECT("employee_namefield_form")
> > mike.show

> > I expect the Window to take focus, and stop execution on the Function
> bellow
> > it...  But it doesnt seem to stop execution because the click event
exits,
> > thus closing my window... I thought Windowstate Modal was suppose to
stop
> > execution, but it doesnt... so What do I do to stop execution until the
> > "mike" form close?



Tue, 29 Nov 2005 02:54:48 GMT  
 HELP VFP 7.0 Simple Question
Are you referring to the Show Window Property set to "As Top Level Form"?
Quote:

> The issue has to do with the a Property on the form... I dont know which
> one, but if its enabled you become instnatly screwed without any chance of
> modal

> Mike



>>from the help: [FormSet.]Object.Show([nStyle])Parameters
>>  nStyle
>>  Determines how a form is shown. The following values are valid:
>>        Value Description
>>        1 Modal. No user input (keyboard or mouse) can occur in any other
>>form or in the menu until the modal form is hidden or released. The

> program

>>must hide or release a modal form (usually in response to some user

> action)

>>before further user input can occur. Although other forms in your
>>application are disabled when a modal form is displayed, other

> applications

>>are not.
>>        2 (Default) Modeless. Code that occurs after the Show method is

> run

>>as it is encountered.

>>  If you omit nStyle, the form is shown in the style specified by the
>>WindowType property.

>>Remarks


>>>VFP7

>>>I created an Form based Object named "employee_namefield_form"
>>>I then turned Windowstate to Modal, or Modeless...
>>>I then use the code in a click event of a button:

>>>mike = CREATEOBJECT("employee_namefield_form")
>>>mike.show

>>>I expect the Window to take focus, and stop execution on the Function

>>bellow

>>>it...  But it doesnt seem to stop execution because the click event

> exits,

>>>thus closing my window... I thought Windowstate Modal was suppose to

> stop

>>>execution, but it doesnt... so What do I do to stop execution until the
>>>"mike" form close?



Tue, 29 Nov 2005 08:47:20 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. simple question needs a simple answer

2. HELP - Simple VFP5 questions!

3. HELP - Simple VFP5 questions....

4. HELP - Simple VFP5 questions....

5. HELP... simple question

6. Simple Question on TextBoxes Plz Help

7. simple question on menus, plz help

8. upsizing vfp table to SQL 7.0 newbe question

9. VFP 7.0 Report Question

10. Upsize Current VFP 7.0 to SQL Server Forms question

11. simple vfp question about commnects

12. simple question -- use ocx in VFP form

 

 
Powered by phpBB® Forum Software