Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with closing a form
Message
 
 
To
26/04/2003 05:29:57
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00781806
Message ID:
00781855
Views:
11
Hi David,

I see that you got your answers from other people. Thre's no need to direct your initial posts to any particular person.
In regard to your code, I would recomend to use WIndows API Sleep function instead of INKEY() because it uses less Windows resources.
DECLARE Sleep IN WIN32API LONG nDelayMilliseconds
SLEEP(2000)		&& wait 2 sec's
>Mr. Berezniker,
>
>Please excuse me if I am not requesting help in the proper manner.
>I am new to the UT and have not done this before. I have read
>many of your replies to other's problems and I like your style.
>
>How does one Programatically close a form from Within the form?
>
>I have a plain form created from the VFP Form baseclass. The only
>code is in the Init. I want the form to display "Hello World"
>for 5 seconds then close, so I display it as the Caption of a Label.
>There are no controls on the form.
>
>* Init code
>Thisform.Visible = .T.
>Thisform.Label1.Caption = 'Hello World'
>=Inkey(5)
>Thisform.Release
>
>The form displays the label but does not close.
>If I put a Command Button on the form, with
>THISFORM.RELEASE in the Click method, it closes
>the form as expected.
>
>I don't understand what's going on here..... I have no object
>references, no instances of anything that I am aware of....
>Why won't the form Release and disappear? Am I doing these actions
>in the wrong place? How does one close the form under
>these circumstances?
>
>Thank you for your patience.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform