By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,961 Members | 1,332 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,961 IT Pros & Developers. It's quick & easy.

Showing a secondary form

P: n/a
I have a main form and then a secondary form that allows entry of some
settings. I want to show the secondary form modally (I guess using
..ShowDialog), but I'd like it shown against the background of the main
form. At present using frm2.showdialog eg from a main form menu click
causes the main form to disappear from the background, which is a
little disorientating for the user.

Is this the standard behaviour of ShowDialog or have I got a bug (like
a me.hide hidden away somewhere relating to the main form that I need
to hunt down) ?

JGD
Nov 21 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
John,

Just set in your dialog form
\\\
frm.owner = me
///

And you should of course make than frm, something smaller otherwise it looks
strange.

The mainform should not disapear when the dialog form is smaller, when it
does, than show us some code you are using.

With the showdialog is as far as I know only a bug with the behaviour of the
standard form buttons and not in this case.

I hope this helps?

Cor

"John Dann" <ne**@prodata.co.uk>
I have a main form and then a secondary form that allows entry of some
settings. I want to show the secondary form modally (I guess using
.ShowDialog), but I'd like it shown against the background of the main
form. At present using frm2.showdialog eg from a main form menu click
causes the main form to disappear from the background, which is a
little disorientating for the user.

Is this the standard behaviour of ShowDialog or have I got a bug (like
a me.hide hidden away somewhere relating to the main form that I need
to hunt down) ?

JGD

Nov 21 '05 #2

P: n/a
Your main form should not be disappearing w/o you having coded it to do so.

Greg

"John Dann" <ne**@prodata.co.uk> wrote in message
news:rj********************************@4ax.com...
I have a main form and then a secondary form that allows entry of some
settings. I want to show the secondary form modally (I guess using
.ShowDialog), but I'd like it shown against the background of the main
form. At present using frm2.showdialog eg from a main form menu click
causes the main form to disappear from the background, which is a
little disorientating for the user.

Is this the standard behaviour of ShowDialog or have I got a bug (like
a me.hide hidden away somewhere relating to the main form that I need
to hunt down) ?

JGD

Nov 21 '05 #3

P: n/a
On Sat, 1 Jan 2005 19:20:38 +0100, "Cor Ligthert"
<no************@planet.nl> wrote:
Just set in your dialog form
\\\
frm.owner = me
///


OK thanks. Is there any reason not to say:

frm.showdialog(Me)

(Which I've just discovered with your prompting and which seems to
work equally well)

JGD
Nov 21 '05 #4

P: n/a
John,

There is in my opinion never a reason not to use something, that is the
poweer of dotnet, there is not a best way, there are maybe ways to avoid.

Just my thought,

Cor
Nov 21 '05 #5

P: n/a
"John Dann" <ne**@prodata.co.uk> schrieb:
I have a main form and then a secondary form that allows entry of some
settings. I want to show the secondary form modally (I guess using
.ShowDialog), but I'd like it shown against the background of the main
form. At present using frm2.showdialog eg from a main form menu click
causes the main form to disappear from the background, which is a
little disorientating for the user.

Is this the standard behaviour of ShowDialog or have I got a bug (like
a me.hide hidden away somewhere relating to the main form that I need
to hunt down) ?


Normally, showing a form modally does not /hide/ the form it's shown on.
Can you post the code you are using to show the 2nd form?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #6

P: n/a
On Sat, 1 Jan 2005 19:46:24 +0100, "Herfried K. Wagner [MVP]"
<hi***************@gmx.at> wrote:
Normally, showing a form modally does not /hide/ the form it's shown on.
That's what I thought.
Can you post the code you are using to show the 2nd form?


Well I would but it's fairly straightforward and innocuous. But more
to the point, now that I've gone back and taken out the owner
reference as a test, the main form isn't disappearing any more! But
I'd swear it was happening every time before. So something's obviously
changed but it's probably not worth taking anyone's time in
speculating or investigating what it might have been. Just hope it
doesn't happen again!

Thanks everyone anyway.

JGD
Nov 21 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.