Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem on top-level form

Status
Not open for further replies.

gutay008

Programmer
Nov 9, 2015
34
PH
Hello,
i'am trying here to close my form which was set to top-level. I think the release will not work with the top-level form but quit does.
I only want to release the form not to quit the entire application.



thanks for the help
 
I believe something prevent the form to be closed.
Could be some object that is not released.
Could be another variable reference that point to the same form.

Respectfully,
Vilhelm-Ion Praisach
Resita, Romania

 
As Vilhelm indicates already, there have to be other reasons than the top level status. A top level form in general can be released without fulfilling any additional requirements other forms don't have (both in top level forms and in screen forms).

Code:
Public o1,o2
o1 = CreateObject("tlform")
o1.Show()
o1.Release()
Release o1
o2.Caption ="still alive"
Define Class tlform as form
   showwindow = 2
   
   Procedure init()
      o2= CreateObject("intlform")
      o2.show()
   Endproc
EndDefine 
Define Class intlform as form
   showwindow = 1
EndDefine

This shows the in top level forms o2 is still alive when its top level form is released and it shows the top level form o1 can be released without problem.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top