Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Cannot make a visible window modal

1,523 views
Skip to first unread message

Jay Jackson

unread,
May 12, 1998, 3:00:00 AM5/12/98
to

I get this error each time I try to show a specific form as modal. There's
nothing special about this form (single border, Normal style), but I get
this "Cannot make a visible window modal" when trying to show this form as
modal. This happens whether I use

form1 := Tform1.Create(application); or
form1 := Tform1.Create(nil); or
form1 := Tform1.Create(tform1, form1);

then try to call -------- form1.showmodal;

The strange thing about this is, the form isn't auto-created but it appears
on screen without me calling Show or Showmodal (it isn't an MDI child
either).

Why is this happening and how do I fix it? I'm using D2.

Thanks.

Andreas Prucha

unread,
May 12, 1998, 3:00:00 AM5/12/98
to

In article <6jafq7$al...@forums.borland.com>, "Jay Jackson" <jay.jackson@no_spam.mci.com> wrote:
>I get this error each time I try to show a specific form as modal. There's
>nothing special about this form (single border, Normal style), but I get
>this "Cannot make a visible window modal" when trying to show this form as
>modal. This happens whether I use

Hi,

Check the "visible" property of the form. It may not be TRUE.

Hope this helps


Andreas

--
helicon software development | helicon Translator for Delphi 3
| Localization tool for
hel...@helicon.co.at | Inprise/Borland Delphi 3
http://www.helicon.co.at | http://www.helicon.co.at/translator3


Jay Jackson

unread,
May 12, 1998, 3:00:00 AM5/12/98
to

Nope, that's not it - the form visible property is true.

Andreas Prucha

unread,
May 12, 1998, 3:00:00 AM5/12/98
to

In article <6jak4s$al...@forums.borland.com>, "Jay Jackson"
<jay.jackson@no_spam.mci.com> wrote:
>Nope, that's not it - the form visible property is true.
>
>
Hi,

Aem, "may not be TRUE" does not mean "TRUE can cause this problem"?
Sorry if I used the wrong words - English is not my native language.

Anyway, try to set it to FALSE.

Matt Lee

unread,
May 13, 1998, 3:00:00 AM5/13/98
to

>Nope, that's not it - the form visible property is true.


That's why it is showing, because visible is set to true (probably at
design time).
Set Visible to false in order to make the window modal.

--matt

Terry Hoffmann

unread,
May 13, 1998, 3:00:00 AM5/13/98
to

> Aem, "may not be TRUE" does not mean "TRUE can cause this problem"?
> Sorry if I used the wrong words - English is not my native language.

Andreas,

Your English is fine. The statement you made can be
interpreted two ways, and he picked the other one <g>. The
way you meant it, it said that the value in a form in *this
situation* can not be set to true, but he thought you meant
that the value in *his* form might not be true, so he
checked, and it was.

Cheers,
Terry

Jon Lowe

unread,
May 14, 1998, 3:00:00 AM5/14/98
to

On Tue, 12 May 1998 17:43:16 -0400, "Jay Jackson"

Was the form _ever_ set up as an MDI child? I know that if I set up a
form originally as an MDI child, then try to change it to Normal, I
get this message...


<jay.jackson@no_spam.mci.com> wrote:
>I get this error each time I try to show a specific form as modal. There's
>nothing special about this form (single border, Normal style), but I get
>this "Cannot make a visible window modal" when trying to show this form as
>modal. This happens whether I use
>

>form1 := Tform1.Create(application); or
>form1 := Tform1.Create(nil); or
>form1 := Tform1.Create(tform1, form1);
>
>then try to call -------- form1.showmodal;
>
>The strange thing about this is, the form isn't auto-created but it appears
>on screen without me calling Show or Showmodal (it isn't an MDI child
>either).
>
>Why is this happening and how do I fix it? I'm using D2.
>
>Thanks.
>

jon...@mindspring.com or
lowe.comput...@mindspring.com

Jay Jackson

unread,
May 14, 1998, 3:00:00 AM5/14/98
to

Yes, it was originally a MDI Child. How did you fix yours?


Jon Lowe

unread,
May 15, 1998, 3:00:00 AM5/15/98
to

I basically had to start over with a brand new form.

But, I don't remember if I tried this or not, but you might want to
make a copy of .pas file, then delete all of the code from all of the
procedures/functions in the original. Then save (which should get rid
of the procedure/function blocks). Then, through the property editor,
re-create all of your procedures/functions, and paste the saved code
back in.

I don't know if this will help or not, and in fact, thinking about it,
it's basically what I had to do when starting over, just with a brand
new form...

Sorry, I know this is not necessarily the answer you're looking for...


On Thu, 14 May 1998 16:01:33 -0400, "Jay Jackson"
<jay.jackson@no_spam.mci.com> wrote:

>Yes, it was originally a MDI Child. How did you fix yours?
>
>

jon...@mindspring.com or
lowe.comput...@mindspring.com

Martin Sommerhalder

unread,
May 18, 1998, 3:00:00 AM5/18/98
to

You should try:
CreateForm( 'Form1', False );
Form1.ShowModal ;
Form1.Free;

Since I only have a german version of D
Under Project - Options - Forms
move Form1 from the left Listbox to the Listbox on the right (maybe
Available Forms)
Martin Sommerhalder <ma...@somdata.ch>


Jay Jackson schrieb in Nachricht <6jafq7$al...@forums.borland.com>...

pancakenuk...@gmail.com

unread,
Jun 27, 2015, 5:19:06 PM6/27/15
to
On Tuesday, May 12, 1998 at 3:00:00 AM UTC-4, Jay Jackson wrote:
> I get this error each time I try to show a specific form as modal. There's
> nothing special about this form (single border, Normal style), but I get
> this "Cannot make a visible window modal" when trying to show this form as
> modal. This happens whether I use
>
> form1 := Tform1.Create(application); or
> form1 := Tform1.Create(nil); or
> form1 := Tform1.Create(tform1, form1);
>
> then try to call -------- form1.showmodal;
>
> The strange thing about this is, the form isn't auto-created but it appears
> on screen without me calling Show or Showmodal (it isn't an MDI child
> either).
>
> Why is this happening and how do I fix it? I'm using D2.
>
> Thanks.






I get this too, but I was just using making Hello World in Javascript.
can anyone help me please? Here was my text:

<!doctype html>
<html>
<head>
<title>Stuff</title>
</head>

<body>
<script type = "text/Javascript">
alert("Hello world!);
</script>

</body>
</html>
0 new messages