How do I know the called form is returned to the calling form?

My FormA called FormB. When FormB is released, the calling form(FormA) can drive any event, or any kind of method to know that?
0
Big
6/17/2014 1:24:14 AM
embarcadero.delphi.intraweb 3901 articles. 1 followers. Follow

2 Replies
1118 Views

Similar Articles

[PageSpeed] 19
Get it on Google Play
Get it on Apple App Store

You could do it by setting and checking a variable in the UserSession.  FormB could set a value like UserSession.FormBKilled : Boolean.  FormA could then check that value and act upon it.

The other option would be to have form B call a method, or set a value, on FormA before it gets destroyed.

procedure TFormB.ExitBtnClick(sender: TObject);
var  AForm : TIWForm;
begin
   WebApplication.SetActiveForm(WebApplication.FindComponent('FormA') as TIWContainer);
  TFormA(WebApplication.ActiveForm).MyProcedureCall;  //this call can access any public method or property of FormA
  self.Release;
end;

procedure TFormA.MyProcedureCall;
begin
  //put your code here to act on FormB being closed
end;
0
Daniel
6/17/2014 7:06:12 PM
> {quote:title=Big Two wrote:}{quote}
> My FormA called FormB. When FormB is released, the calling form(FormA) can drive any event, or any kind of method to know that?

OnRender event of FormA will trigger because it will be rendered again. the IWApplication object holds a list of your application active forms in a form of a stack. This property is named ActiveForms. When you release a IWForm, the last IWForm on the stack becomes the new ActiveForm. You can check this to detect if you have an active form of some specific form already created and do something with it.

Best regards
0
Alexandre
6/18/2014 3:17:58 AM
Reply:

Similar Artilces:

Tell CALLED form who CALLED
I am opening a form (from my main form) with application.createform(TmyForm, myForm) myForm.ShowModal and I would like the form myForm know which form opened it (was it MainForm or Form2 or Form3, etc..) How do I pass this info onto the called form myForm? I could stored it in a GlobalVariable but there must be a nicer way ThankYou tom clancy a écrit : > I am opening a form (from my main form) with > > application.createform(TmyForm, myForm) > myForm.ShowModal > > and I would like the form myForm know which form opened it (was it MainForm or Fo...

Calling Intraweb forms from non Intraweb pages
Hello, my idea is to visualize a specific page of an intraweb app in an iframe tag of another page (html) when the user clicks on a link of the page itself. The question is: how to pass the form id via url parameter? Any help will be appreciated. Thanks > my idea is to visualize a specific page of an intraweb app > in an iframe tag of another page (html) when the user clicks > on a link of the page itself. The question is: how to pass the > form id via url parameter? Any help will be appreciated. You can use normal params, like: www.mywebsite.com/myiwapp?form_id=f...

Positioning a form relative to a calling form
I'm ShowModal-ing a form, and in the Show event I open and show a from that I'm using as a data-entry toolbar. The problem is setting the position relative to the modal form. I try to capture the current position of the modal form in a TPoint, but I seem to be getting the original design position, not the current position. And that's a problem on monitors with lower resolution than my development box because it pushes the toolbar form to the right. The modal form is poMainFormCenter. The called/toolbar form is poDesigned. In my OnShow handler in the modal form: ...

Web form calling event that are not being called
Hi Everyone, I have been creating web forms in visual studio 2003 C#.  My problem that I am having is that the web form is calling events more than once. For example if I click on a button the event is called twice. It's almost as if the event has a “for next loop” on it. Can some please help me because this is happening on all of the form that I am creating that allows data selecting or data input. Here's some code that loads a “dropdownlist” with a “button” and “label” when you click the button the number selected will display in the label. using System; using...

call a web form from a window form
Hi all I need help about calling a web form from a window form. i don't know if this is possible but if it possible please give me some help, any kind of help. thanks. Miguel A. Usually you can open any exe from within the windows form, and to do so, you could open the iexplorer.exe and give it the url of the webform to run it. regards.Bilal Hadiar, MCP, MCTS, MCPD, MCTMicrosoft MVP - Telerik MVP would you give me an example? please, tanksMiguel A. please i need some documentation or examples about this.Miguel A....

Calling a form from different forms as modal ...
Hii want to write a form which user chooses some values from itand make it modal (which user can't do anything else on this site without  closing or choosing something.)it can be done with module popup extender on the same page.But i want to call the same popup (or form) from several forms without rewritten it. how can i do this ?.. fer  inherits? register popup scripts from server?...

How do you call a windows form from a web form?
hi,  i doing a vb project which include a web form and a windows form.   How do you call a windows form from a web form? can any kind souls plz tell mi haha....my email is EDITED. i appreciate the help   regards kit  EDITED By: longhorn2005 This gives you an idea using VS 2003-- most of it is still relevant:  http://msdn.microsoft.com/msdnmag/issues/02/01/UserCtrl/---------------------------------------MCP - Web Based Client Development .NET 2.0 I am attempting to do something similar, I have an existing windows form application that I was asked to i...

calling a web form from another web form
I would like to know what is the best way to open a web form from another web form. I would like to call it from a button control. Thanks Well, if I've grasped your question right, there are many methods to do that: 1)Response.Redirect > To navigate to another page from code and is equal to clicking a hyperlink. I suggest this as I think it's closer to your question. 2)Server.Transfer > This ends the current web form and begins a new web form. It's usable when you want to pass some variables i.e (Label1.Text) to the next immediate page. It's not safe though and not used to send p...

Calling MDI Form from antoher MDI Form
Hi I have a MDI project where there are two MDI DLL's. When calling the two forms from the main screen they work perfectly fine. However, I do have a need to go straight to the other MDI Form from the first MDI and vice versa. Everything I tried results in a access exception. What I am trying to do is to return to the MDI main form then go to the form required next. The MDI are created in line with the C++ Builder 6 Dev Guide - Using Forms in DLL's. Many Thanks Ian Broome ...

Setting Main Form and Calling Another Form
Hi All: Again, I am new to Delphi. I am using XE2 Pro. I am attempting my first app. I want it to have multiple forms, with the Main form calling other forms. How do I set which form is the form that opens at the start of application? How do I get frmMain to call frmSecondary? Thanks in advance. > {quote:title=Thomas Clark wrote:}{quote} > Hi All: > > Again, I am new to Delphi. I am using XE2 Pro. > > I am attempting my first app. I want it to have multiple forms, with the Main form calling other forms. > > How do I set which form is the f...

calling control in one form from another form
hi all, i have two forms in a C#.net windows application i have a list view control in form1. i want to fill this list view from form2 and display form1 from form2. any idea of doing this?thanks in advance use showdialog to get the input.Thank You--some funny homemade software,http://www.geocities.com/lhcsoft2004/my software grouphttp://groups.yahoo.com/group/LauHanChingSoftware/...

Calling a uniface form from delphi
Hi All, Currently, I have a requirement wherein I need to migrate a form from uniface to delphi. This form was the main form in the application. It was responsible for calling various other forms Previously ---------- -- Uniface form called Delphi form -- Uniface form called uniface form New Requirement ----------------- -- Delphi form has to call uniface form -- Delphi form has to call delphi form. I am unable to figure out how to proceed for calling a uniface form FROM a delphi form. I will be glad to provide any further information, if required by you. Request your...

Call an ASP form that returns only a string. And display the returned string in a text box
Hi. My goal is to call an ASP form that returns only a string, and display the returned string in a ASP.NET text box. Let's talk about the existing html forms. There are two forms: form1.asp and FindLocation.asp Form1 lets you enter a property address and a zip code. When hitting the submit button it calls the form FindLocation.asp. The FindLocation.asp form returns a string that shows: - an error message if the address does not exists - the municipality where the property is located Now let's talk about my project in ASP.NET. I am currently writting a new ASP.NET...

Setting the Size of a Modal Form called by a Main Form
Why do I get an error for clicking on btnMaxClick? {code} unit uEnv; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Dialogs; type TfrmEnv = class(TForm) img0101: TImageControl; img0201: TImageControl; img0301: TImageControl; img0401: TImageControl; img0501: TImageControl; img0601: TImageControl; img0701: TImageControl; img0102: TImageControl; img0202: TImageControl; img0302: TImageControl; img0402: TImageControl; img0502: TI...

Web resources about - How do I know the called form is returned to the calling form? - embarcadero.delphi.intraweb

Energy returned on energy invested - Wikipedia, the free encyclopedia
The natural or original sources of energy are not usually included in the calculation of energy invested, only the human-applied sources. For ...

How Facebook Returned A/B Testing To Mobile Apps
When Facebook rewrote its mobile applications and converted them from custom Web stacks to native development stacks, it lost the ability to ...

Facebook temporarily reveals ‘returned value’ metric for ads
Some Facebook advertisers temporarily saw a new metric called “returned value” in their Ads Manager dashboard. Facebook says the metric was accidentally ...

The Night Steve Jobs returned to Apple, Dec 20, 1996 - a set on Flickr
Working late on a Friday on December 20th at Apple Computer as Mac OS Evangelist, my manager came rushing past my office door saying to come ...

Batista reveals why he returned to WWE - YouTube
The Animal talks about overcoming a broken back, his immersion in Jiu-Jitsu training, and his desire to capture the WWE World Heavyweight Championship. ...

Fugitive US businessman Zack Shahin returned to UAE, says spokesman
... a taser following his release. A fugitive American businessman who is facing multi-million dirham corruption charges in Dubai has been returned ...

Bender is back! Belair’s favourite robot returned - AdelaideNow Search Search
GOOD news, everyone! Bender the robot — possibly the coolest letterbox in the Adelaide Hills — has been returned just days after being stolen. ...

'We were all sick': returned asylum seekers tell of lifeboat ordeal to Java
The orange lifeboat wallowing in the shallows off the coast of Central Java is proving to be a highly effective weapon in Australia's military ...

Dancing Shiva to be returned during Abbott's India visit
The $5 million illegally trafficked dancing Shiva that ended up in the National Gallery of Australia will be handed back to Indian Prime Minister ...

Family of sisters returned to Italy complains of police actions
THE family of four sisters, who were returned this week by Australia to Italy, say they will file a complaint to the Commonwealth Ombudsman over ...

Resources last updated: 12/29/2015 8:14:42 PM