Error Cannot Make A Visible Window Modal Delphi
General FAQ Ask a Question Bugs and Suggestions Article Help Forum Site Map Advertise with us About our Advertising Employment Opportunities About Us Ask a Question All Questions All Unanswered FAQ Nijboer52.8K Rate this: Please Sign up or sign in to vote. That is not true. Join your peers on the Internet's largest technical computer professional community.It's easy to join and it's free. navigate here
BTW adding an button to Form2 in TForm1.Button1Click() is just bad design, don't do that (one form shouldn't change other like that). That's the cause of your error message. Reply to this Thread Search Forum Back to Thread List Replies: 15 - Last Post: Sep 14, 2016 11:15 PM Last Post By: jenny foster jenny foster Posts: 49 Registered: Setting it to true fixed the problem. directory
To create a form dynamically, follow these steps: 1. that may be hidden, or hit escape or enter.basically this signifies a programming error on my part -- i'll try to track it down. At some point in the future you might want to have two instance of the form. Join Us! *Tek-Tips's functionality depends on members receiving e-mail.
The thing is that this is the only call to create and show that form so although it is created as a global variable, nothing else touches it That is why begin CancelDrag; if Visible or not Enabled or (fsModal in FFormState) or (FormStyle = fsMDIChild) then raise EInvalidOperation.Create(SCannotShowModal); // <-- here ... The app is running at around 25 sites. All rights reserved.Unauthorized reproduction or linking forbidden without expressed written permission.
I create forms at run time using this code: frmSomething := TFrmSomething.Create(Self); -which is equivalent, I have read, to- Application.CreateForm(TFrmSomething, frmSomething). At one site only and not on every occurrence of the showmodal command for the form (between 10 and 2% of the times ) the program crashes with 'Cannot make a The app is running at around 25 sites. http://www.delphigroups.info/2/10/733929.html results form is declared as a global variable of TResultForm.
All I have to do is creating new form and copy this broken form into new form. Permalink Posted 28-Jun-12 4:58am Richard MacCutchan572K Comments Winston_D 28-Jun-12 11:20am To clarify my situation. This makes the error message even harder to figure out. What is the bandwidth cost of running a full node?
Solution 4 Accept Solution Reject Solution function TMainForm.CreateModal(ModalForm: TFormClass): Integer; begin with ModalForm.Create(Self) do try FormStyle := fsNormal; WindowState:=wsNormal; Hide; if (Self.Owner is TWinControlClass)and(Self.FormStyle=fsMDIChild) then begin//if Self is MDIChild then set positions by check over here But you'll need to change the code above from mrYes to the one you selected)And last, make sure you set the modal form's visible property to FALSE...end; RE: Cannot make a RE: Cannot make a visible window modal majlumbo (Programmer) 25 Jan 11 22:19 Not completely sure how you have your forms setup, but maybe this will solve the problem.I'm assuming you It is time consuming testingbecause I have to get a new exe to the user each time.
Then you can delete any buttons by calling Free on those buttons. This code snippet is not enough to say a reason. procedure DoCreateLocalForm; var frmLocalSMS: TfrmSMS; begin frmLocalSMS:=TfrmSMS.Create(self); try frmLocalSMS.edCell.text := frmLocalSMS.fixnumber(s); frmLocalSMS.showmodal; finally freeandnil(frmLocalSMS); end; Back to Thread List Legend Helpful Answer (5 pts) Correct Answer (10 pts) his comment is here You may have set a form's visible property to True when it was already visible.
Also I cannot replicate the error on any of my own machines. 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 Resources Join | Indeed Jobs | Advertise Copyright © 1998-2016 ENGINEERING.com, Inc.
Richard MacCutchan 28-Jun-12 11:34am Did you see this suggestion?
I believe that you should simply remove TForm2.FormCreate. From your description it seems like you are trying to use an existing Window and somehow make it modal. 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! Change the visible property back to False in the IDE to prevent this. -- Clay Shannon, author of "the Wacky Misadventures of Warble McGorkle" (download it at http://www.winsite.com/bin/Info?12500000036639) From: Andrew Muir
asked 2 years ago viewed 659 times active 2 years ago Related 11Creating components at runtime - Delphi1Creating Delphi Objects at runtime based on class type2Why can't I fetch an AOL If you change a form's FormStyle property from fsMDIChild, it will remain True. A Riddle of Feelings Why was Gilderoy Lockhart unable to be cured? http://oncarecrm.com/error-cannot/error-cannot-make-http-connection.html share|improve this answer edited Jul 31 '14 at 8:54 answered Jul 31 '14 at 8:25 ain 16.5k22954 Yes this works, but it doesn't solve my problem entirely as I
Now in this example I have 3 buttons on the form, when I click on button 1 I want a 4th button to appear.