Terms of Service Layout: fixed | fluid CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100 Board index » delphi » Cannot make a visible window Richard MacCutchan 28-Jun-12 11:34am Did you see this suggestion? I create forms at run time using this code: frmSomething := TFrmSomething.Create(Self); -which is equivalent, I have read, to- Application.CreateForm(TFrmSomething, frmSomething). Roy, that's why I changed in the original code it was "dmData.cdsAcctMasterPHONEC.value". http://culturahq.com/cannot-make/cannot-make-a-visible-window-modal-delphi-7.html
Then the user doesn't have to close it in order to continue her/his work. All rights reserved. Developer Tools Blackfish SQL C++Builder Delphi FireMonkey Prism InterBase JBuilder J Optimizer HTML5 Builder 3rdRail & TurboRuby Database Tools Change Manager DBArtisan DB Optimizer ER/Studio Performance Center To do this: Open your project in Delphi Open the form that raises the exception. Remember that instance methods can use Self to refer to the instance. http://www.codeproject.com/Questions/412005/Access-violation-error-when-for-a-multiforms-appli?arn=0
begin CancelDrag; if Visible or not Enabled or (fsModal in FFormState) or (FormStyle = fsMDIChild) then raise EInvalidOperation.Create(SCannotShowModal); // <-- here ... Is this Business or Tourism? Why you need this check?
The error comes from ShowModal() itself: function TCustomForm.ShowModal: Integer; var ... Helpful answers available: 0. Only my main form is 'auto-created', all additional forms are set as 'available' in the the project options. Why you need this check?
Thread Tools Display Modes #1 10-06-2002, 01:00 PM frankarabano Member Join Date: Aug 2002 Posts: 60 Exception: 'Cannot make a visible window modal' Could any of you please Any advice appreciated as I am unable to replicate the error on my system and am reduced to sending the user different versions to try. I don't know why the finally (see below) would fail but it is the only explanation that makes sense to me at this time. I appreciate your time and effort.
share|improve this answer edited Jul 31 '14 at 9:00 answered Jul 31 '14 at 8:20 David Heffernan 433k27588955 Yes this works, but it doesn't solve my problem entirely as jenny foster Posts: 49 Registered: 12/6/09 Re: Cannot make a visible Window Modal Reply Posted: Sep 14, 2016 12:21 AM in response to: Lajos Juhasz Thanks again I've got a ModalForm that has some buttons on it created at runtime, but when the user presses a " special button" I want all the buttons from the form to Close Box Join Tek-Tips Today!
Code for that works, no problems. http://www.tek-tips.com/viewthread.cfm?qid=1635801 Spurious calls to CloseModal and ShowModal from TForm2.Button1Click There's no need to call CloseModal and ShowModal in that method. IS there a way to force a not true condition (fsModal in FFormState) ? accept if it helped.
Desde já agradeço qualquer ajuda.• Responder • Citar Post mais votado Cebikyn   - 07 jun 2004 Além do que foi citado a cima, verifique se a propriedade Enabled do this content DarkHorse View Public Profile Send a private message to DarkHorse Visit DarkHorse's homepage! One of the Secondary Forms returns to the Main Form. In this case I would use a local object to display the modal object (also don't assign value directly to a string - it will fail for a null): procedure TfrmMain.DBCellDblClick(Sender:
procedure TMainForm.Button1Click(Sender: TObject); begin ResultsForm := TResultForm.Create(self); try ResultsForm.ShowModal; finally ResultsForm.Free; end; end; for dynamically creating a new form is sound but one should take care to note that the dynamically Why there are no approximation algorithms for SAT and other decision problems? I >added one more button to the form, compiled, and ran the application, >and when I invoke the form >I get this error message: "Cannot make a visible window modal". weblink Setting it to true fixed the problem.
ANN: DUnit show in IDE5. Why is this C++ code faster than my hand-written assembly for testing the Collatz conjecture? Find all posts by wenling2000 #4 10-06-2002, 10:45 PM DarkHorse Senior Member Join Date: Dec 2000 Posts: 1,636 RE: Exception: 'Cannot make a visible window modal' Hi, Try
Another possibility can be that at one or more places you have showned the form using the Show instead of ShowModal. hth Bernd Lajos Juhasz Posts: 509 Registered: 3/14/14 Re: Cannot make a visible Window Modal Reply Posted: Sep 12, 2016 7:22 AM in response to: jenny foster As Lajos Juhasz said you might use this global form in other places and you expect that the form can be still in a created state. Edited by: jenny foster on Sep 8, 2016 12:09 AM Edited by: jenny foster on Sep 8, 2016 12:10 AM Roy Lambert Posts: 387 Registered: 10/21/99 Re: Cannot make a visible
See more: Delphi I am trying to make a multiforms application by having only the main form created on start up and creating each new additional form dynamically as needed by But if I run my code I get the error "Cannot make a visible window modal" I read that has something to do with the fact that I don't properly close My question is now, how can I achieve this result I get from clicking on the button from Form1 with clicking on the button from Form2. check over here Please click accept if this helps Simon SadMan Software http://www.simes.clara.co.uk simes View Public Profile Send a private message to simes Visit simes's homepage!
Join Us! *Tek-Tips's functionality depends on members receiving e-mail. What is with the speech audience? Solution 2 AcceptÂ Solution RejectÂ Solution I think the message is reasonably clear. The error comes from ShowModal() itself: Fair enough - after I have developed my time machine I'll go back and tell myself not to fix the problem in the way I
I added one more button to the form, compiled, and ran the application, and when I invoke the form I get this error message: "Cannot make a visible window modal". Do humans have an obligation to prevent animal on animal violence? The other two do not with the following message "Cannot make a visible window modal."What is my problem and what is the solution? Create and destroy it in a method.
e chamei de novo.. This makes the error message even harder to figure out.