Home » Developer & Programmer » Forms » how to find whether the form is open or not & How to check open_form & problem in hide or re
how to find whether the form is open or not & How to check open_form & problem in hide or re [message #142543] Sat, 15 October 2005 05:52 Go to next message
selvakumar_82
Messages: 138
Registered: October 2005
Location: chennai
Senior Member
Hi,

In my menus , i have 3 submenu items,


if i click 1st item , call_form('formname'); 1st one will appear,

if i click 2nd menu item , call_form('2ndformname');2nd one will appear,

samething for 3rd item,

finally if i click close int the top of the window, i have to close each form,

My problem is if i click anyone menu item, it should replace or hide the previous window.

I know call_form (hide and replace option was there,but i dnt know how to use ) was there , any other method is there,
Re: problem in hide or replace [message #142608 is a reply to message #142543] Sun, 16 October 2005 18:36 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Have a look at the new_form and open_form commands.

David
Re: problem in hide or replace [message #142616 is a reply to message #142608] Sun, 16 October 2005 22:24 Go to previous messageGo to next message
selvakumar_82
Messages: 138
Registered: October 2005
Location: chennai
Senior Member

My problem is , i have to close previews forms whenever open a new form,

but if i use call_form or open_form finally i have to close each forms,

Re: problem in hide or replace [message #142617 is a reply to message #142616] Sun, 16 October 2005 22:26 Go to previous messageGo to next message
selvakumar_82
Messages: 138
Registered: October 2005
Location: chennai
Senior Member
IF i opened 3 forms , when ever i open a 4 th form,

previews 3 forms should close automatically,

but i am not able to close that
Re: problem in hide or replace [message #142618 is a reply to message #142617] Sun, 16 October 2005 23:05 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Okay, have a look at the commands find_form and close_form.

What you can do in your menu item is perform a "Find_Form(:system.current_form)" which will return the ID of the current_form and use it in a Close_Form command, or try using System.Current_Form directly in a Close_Form command. You will have to test for your 'main' form to make sure that you don't close it accidently.

David
Re: problem in hide or replace [message #142625 is a reply to message #142618] Mon, 17 October 2005 00:05 Go to previous messageGo to next message
selvakumar_82
Messages: 138
Registered: October 2005
Location: chennai
Senior Member
In my first menu ,

i have written

fm_id= find_form(:system.current_form);

in second menu , when ever i press

i used close_form('fm_id');

it s correct , but it s showing argument null ........?
Re: problem in hide or replace [message #142641 is a reply to message #142625] Mon, 17 October 2005 01:24 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Don't set the fm_id in the first menu, set it in the second menu but use the Id_Null function to verify that it has been set before doing the Close_Form.

David

[Updated on: Mon, 17 October 2005 01:24]

Report message to a moderator

Re: problem in hide or replace [message #142674 is a reply to message #142641] Mon, 17 October 2005 03:13 Go to previous messageGo to next message
selvakumar_82
Messages: 138
Registered: October 2005
Location: chennai
Senior Member
i can close the form,

but it is showing argument 1 to built in cant be null....frm-40738:

i will give u the coding,

in first form :
declare 
	fm_id1 formmodule;
	fm_id2 formmodule;
begin
	fm_id1 := find_form('class');
	fm_id2 := find_form('subclass');
	call_form('C:\ora6i\BIN\control');
        close_form(fm_id1);
        close_form(fm_id2);
end;


In second menu :
declare
	fm_id formmodule;
        fm_id1 formmodule;
begin
	fm_id :=find_form('control');
        fm_id1 :=find_form('subclass');

       	call_form('C:\ora6i\BIN\class');
	close_form(fm_id);
        close_form(fm_id1);
end;


In third form
declare
	fm_id formmodule;
        fm_id1 formmodule;
begin
	fm_id :=find_form('control');
        fm_id1 :=find_form('class');

       	call_form('C:\ora6i\BIN\class');
	close_form(fm_id);
        close_form(fm_id1);
end;


Upd-mod: Add code tags

[Updated on: Mon, 17 October 2005 17:52] by Moderator

Report message to a moderator

Re: problem in hide or replace [message #142710 is a reply to message #142674] Mon, 17 October 2005 06:41 Go to previous messageGo to next message
selvakumar_82
Messages: 138
Registered: October 2005
Location: chennai
Senior Member
declare 
	fm_id1 formmodule;
	fm_id2 formmodule;
begin
        call_form('C:\ora6i\BIN\control');
 
	fm_id1 :=find_form('class');
	fm_id2 :=find_form('subclass');
	if not id_null(fm_id1) then
	    close_form('class');
	end if;
  if not id_null(fm_id2) then
	close_form('subclass');
  end if; 
end;


if i use this code , i am not able close the class form

Upd-mod: Add code tags

[Updated on: Mon, 17 October 2005 17:53] by Moderator

Report message to a moderator

Re: problem in hide or replace [message #142809 is a reply to message #142710] Mon, 17 October 2005 18:00 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I have a feeling that you haven't put "C:\ora6i\BIN\" in your FORMSnn_PATH.

Try this: put "C:\ora6i\BIN\" on the find_form statement.

David
How to check open_form [message #143053 is a reply to message #142543] Tue, 18 October 2005 23:02 Go to previous messageGo to next message
selvakumar_82
Messages: 138
Registered: October 2005
Location: chennai
Senior Member

Hi,

I have a problem in closing the form,

I have to close previews forms,whenever i open another form,

So any coding s there to findout or check the open_form;

If the form is open i have to close ,

shall use like this:

if open_form('form_name') is not null then

fm_id :=find_form('class');

close_form(fm_id);

end if;

how to find whether the form is open or not [message #143065 is a reply to message #142543] Wed, 19 October 2005 00:12 Go to previous messageGo to next message
selvakumar_82
Messages: 138
Registered: October 2005
Location: chennai
Senior Member

Hi ,

how to find out whether the is open or not,

(* using if condition ),
Re: how to find whether the form is open or not [message #143071 is a reply to message #143065] Wed, 19 October 2005 00:24 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
For crying out load, please read the text of your post before putting them into the forum.
Quote:

how to find out whether the is open or not
What on earth does this sentence mean? "Whether the" WHAT "is open or not". There is an EDIT button available on your recent posts. If you make an obvious error in your question then EDIT your post and FIX IT. Don't just create a new thread.

Are you trying to tell us the FIND_FORM is not working for you?

David
Re: how to find whether the form is open or not [message #143079 is a reply to message #143071] Wed, 19 October 2005 00:49 Go to previous messageGo to next message
selvakumar_82
Messages: 138
Registered: October 2005
Location: chennai
Senior Member
Find_form is working,

if i open multiple forms , I am not able to close all,

It s showing some errors, So in my coding itself i have to check what r the forms are open,

So i can close opened forms,,,,,,,,

I have to use IF condition for this,

I dnt know how to use Open form with IF condition ......

Got it...........?
Re: how to find whether the form is open or not [message #143085 is a reply to message #143079] Wed, 19 October 2005 01:08 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Open_Form is a procedure not a function. It doesn't have a return value. Please show us the code that you are using. Also tell us in which trigger you have placed it.

David
Re: how to find whether the form is open or not [message #143094 is a reply to message #143085] Wed, 19 October 2005 01:23 Go to previous messageGo to next message
selvakumar_82
Messages: 138
Registered: October 2005
Location: chennai
Senior Member
I am using this coding MENUS,
In the menus i can open 3 forms ,


declare
fm_id formmodule;
fm_id3 formmodule;
begin

call_form('c:\ora6i\bin\class');

if open_form('control') is not null then

fm_id := find_form('control');
close_form(fm_id);

end if;
if open_form('subclass') is not null then

fm_id3 := find_form('control');
close_form(fm_id3);

end if;
end;

whether i can use this type of coding ...............?
Re: how to find whether the form is open or not [message #143095 is a reply to message #143094] Wed, 19 October 2005 01:25 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
What is the name of the form in which you start? That is, what is the command that you are using to start your application?

David
Re: how to find whether the form is open or not [message #143098 is a reply to message #143095] Wed, 19 October 2005 01:36 Go to previous messageGo to next message
selvakumar_82
Messages: 138
Registered: October 2005
Location: chennai
Senior Member
This coding will be in class menu ,

If i press it should close other forms,

In menu item i can start with any form, Its user will open anyhting ,

So i have to write unique coding for that,

Anyway ,

1st one will be -control
2nd -class
3rd -subclass.

Can u understand my problem.....?
Re: how to find whether the form is open or not [message #143104 is a reply to message #143098] Wed, 19 October 2005 01:49 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I know where the coding has been placed. My question is
Quote:

what is the command that you are using to start your application

I don't think you can use the Close_Form command to close the CURRENT form. That's probably why the close_form is failing because you are trying to close the current form. You have to do an exit_form to get out of the last/only form that is running.

Use :system.current_form to determine in which form you are currently porcessing. I realise that I suggested using the current_form in a close_form. Sorry, that probably didn't work. Use the current_form to decide where you are and then find and close the other two forms.

David
Previous Topic: inital value
Next Topic: Ans For Opening Help File .CHm
Goto Forum:
  


Current Time: Fri Sep 20 03:27:41 CDT 2024