While being on the Vendor card I would like to open a new window. The new window should "replace" the existing Vendor card, and therefore close the existing window.
A button with:
FORM.RUN(FORM::"My new funny Window");
CurrForm.CLOSE;
also closes the new window. Anyway to avoid that?
TIA
Peter
Regards
Peter
0
Comments
Have the code behind your button like this.
CurrForm.Visible(FALSE);
There probably is a much better way though <img border="0" title="" alt="" src="images/smiles/icon_smile.gif" />
The differences between the Vendor card, and my new funny window, is that my window shows a LOT of information, and therefore only used in some situations. When done as you say, it still makes all the DB calls, eventhough the window is not shown... Thanks anyway :-)
Peter
FORM.RUNMODAL(FORM::"Your strange window");
currform.close;
try this.
hreinn@tolvumyndir.is
(Btw, I want the botton on both windows, so I can switch between them)
But since the first window isn't really closed until the showing window is closed, it gives my a GPF if you switch to many times... Apparently NF can't handle an unlimeted number of references in its stack..
Peter
It works, but it´s not the best design, you have to place your button in a very strange place.
Create a form, let it contain 2 subforms,
the vendor and your strange window.
the 1000 is to make up for the button, but you have to
place it under the two forms, probably some other way around that. 1000 is not the correct number, you figure that one out for yourself <img border="0" title="" alt="" src="images/smiles/icon_smile.gif" />
the code for the button is:
currform.vendor.visible(not currform.vendor.visible);
currform.strange.visible(not currform.strange.visible);
if currform.strange.visible then begin
CurrForm.WIDTH(CurrForm.strange.WIDTH);
CurrForm.Height(CurrForm.strange.Height + 1000);
end else begin
CurrForm.WIDTH(CurrForm.vendor.WIDTH);
CurrForm.Height(CurrForm.vendor.Height + 1000);
end;
hope it helps.
hreinn
The additional one should be run in place of the vendor card. The onOpen trigger should contain a code to hide the current form and run the vendor card modally. To display the other form, you should close the vendor card and supply a function that could tell the primary form that displaying of another form is requested.
Be extremely careful not to leave the primary form opened when you simply close the vendor card or other form, as the opened hidden form is an effective way to disable all Navison menus, therefor forcing user to restart their computer in order to quit NF.
Urmas Pill
urmas.pill@rlk.ee