Home » Developer & Programmer » Forms » close the window from it self ..... how ?
icon5.gif  close the window from it self ..... how ? [message #279068] Tue, 06 November 2007 16:19 Go to next message
Hany Freedom
Messages: 256
Registered: May 2007
Location: Egypt
Senior Member

when we want to close any window we write :-
hide_window('window_name');

but this code work with me only when I write it in another window , because when I write the code in the indicated window that I want to close it didn't work ...... check the zip attached.
so how can I close the window from the same window .... like this:-
http://img01.picoodle.com/img/img01/5/11/6/f_ERm_27f16ac.png
the Question is :-
How can I close the window from it self ?
  • Attachment: SHOW_HIDE.zip
    (Size: 60.01KB, Downloaded 1121 times)
Re: close the window from it self ..... how ? [message #279072 is a reply to message #279068] Tue, 06 November 2007 17:25 Go to previous messageGo to next message
Soumen Kamilya
Messages: 128
Registered: August 2007
Location: Kolkata
Senior Member

Try with CLOSE_WINDOW() function.

Cheers
Soumen
icon4.gif   how ? [message #279074 is a reply to message #279072] Tue, 06 November 2007 18:15 Go to previous messageGo to next message
Hany Freedom
Messages: 256
Registered: May 2007
Location: Egypt
Senior Member

there not in forms built-in called CLOSE_WINDOW ,
and if you mean to make function by my self in program units ,
you should be more clear about you mean , isn't Question Question Question Exclamation Exclamation Exclamation

[Updated on: Tue, 06 November 2007 18:15]

Report message to a moderator

Re: how ? [message #279222 is a reply to message #279074] Wed, 07 November 2007 06:58 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
The problem you have is that the HIDE_WINDOW() built cannot execute. The focus is still on the close button. While the focus is there the window cannot be hidden. So I suggest you navigate to another field and see what happens.

Does this code work for you?
Begin
   HIDE_WINDOW('T');
   :BLOCK2.P:=1;
   Go_Item('BLOCK2.SHOW_HIDE');
End;
MHE

PS: You're right about the CLOSE_WINDOW built-in: it does not exist. At least, I never heard of it.
Re: how ? [message #279242 is a reply to message #279222] Wed, 07 November 2007 08:09 Go to previous message
Hany Freedom
Messages: 256
Registered: May 2007
Location: Egypt
Senior Member

Thank you ..... the problem has been solved .... Thumbs Up Grin
Previous Topic: .fmx to the users
Next Topic: HOW to invoke FILE from FORM
Goto Forum:
  


Current Time: Tue Dec 03 21:58:31 CST 2024