Home All Groups Group Topic Archive Search About

Nonmodal form on Modal form?

Author
6 Jul 2005 11:14 AM
Ivan Debono
Hi all,

I know that the VB docs say it's not possible, but is there a way (API-wise)
to display a nonmodal form on a modal form?

This is my problem:

I have a form that performs various day end & month routines including
searching and preparing records and calling tons of reports. There is no way
to speed up this because I call stored procedures and it's up to SQL server
to finish when it feels like.

This form is modal because I don't want that the user clicks anywhere else
to close the form, but must click on the Close button.

Due to the time required to prepare records, etc., I need to show some sort
of progress form.

Any ideas to solve this problem?

Thanks,
Ivan

Author
6 Jul 2005 11:47 AM
Ralph
Show quote Hide quote
"Ivan Debono" <ivanm***@hotmail.com> wrote in message
news:eoBcQshgFHA.2644@TK2MSFTNGP09.phx.gbl...
> Hi all,
>
> I know that the VB docs say it's not possible, but is there a way
(API-wise)
> to display a nonmodal form on a modal form?
>
> This is my problem:
>
> I have a form that performs various day end & month routines including
> searching and preparing records and calling tons of reports. There is no
way
> to speed up this because I call stored procedures and it's up to SQL
server
> to finish when it feels like.
>
> This form is modal because I don't want that the user clicks anywhere else
> to close the form, but must click on the Close button.
>
> Due to the time required to prepare records, etc., I need to show some
sort
> of progress form.
>
> Any ideas to solve this problem?
>
> Thanks,
> Ivan
>

The simplest solution is to reverse ownership - a la a 'Splash Screen'.
Display a screen announcing coming events and providing a bail-out if
needed. When your data is ready, hide the splash and display the completed
form.

As an aside, note that with large data intensive apps there are two possible
delaying processes. One is the fetching of data and the other is loading a
control with the fetched data. You didn't mention the total amount of data
your app is managing, but it is always possible that while an app might
'need' 80,000 rows of something - it doesn't necessarily need to display
80,000 rows. It is often useful to refactor an application to remove 'data
processing' routines from a 'presentation' class (a form) into separate
data-providing classes.

hth
-ralph
Author
6 Jul 2005 12:00 PM
Ivan Debono
That's more or less how I approached it.

Data processing happens in an activex exe server so I launched a
multithreaded timer to raise events every 1sec whilst the server is busy.
There could be 80000 records or more but that's not a problem... they never
get passed to the client so no presentation problems there.

Works out fine now :)

Ivan

Show quoteHide quote
"Ralph" <nt_consultin***@yahoo.com> schrieb im Newsbeitrag
news:FI6dnSQpc9CGWFbfRVn-pg@arkansas.net...
>
> "Ivan Debono" <ivanm***@hotmail.com> wrote in message
> news:eoBcQshgFHA.2644@TK2MSFTNGP09.phx.gbl...
> > Hi all,
> >
> > I know that the VB docs say it's not possible, but is there a way
> (API-wise)
> > to display a nonmodal form on a modal form?
> >
> > This is my problem:
> >
> > I have a form that performs various day end & month routines including
> > searching and preparing records and calling tons of reports. There is no
> way
> > to speed up this because I call stored procedures and it's up to SQL
> server
> > to finish when it feels like.
> >
> > This form is modal because I don't want that the user clicks anywhere
else
> > to close the form, but must click on the Close button.
> >
> > Due to the time required to prepare records, etc., I need to show some
> sort
> > of progress form.
> >
> > Any ideas to solve this problem?
> >
> > Thanks,
> > Ivan
> >
>
> The simplest solution is to reverse ownership - a la a 'Splash Screen'.
> Display a screen announcing coming events and providing a bail-out if
> needed. When your data is ready, hide the splash and display the completed
> form.
>
> As an aside, note that with large data intensive apps there are two
possible
> delaying processes. One is the fetching of data and the other is loading a
> control with the fetched data. You didn't mention the total amount of data
> your app is managing, but it is always possible that while an app might
> 'need' 80,000 rows of something - it doesn't necessarily need to display
> 80,000 rows. It is often useful to refactor an application to remove 'data
> processing' routines from a 'presentation' class (a form) into separate
> data-providing classes.
>
> hth
> -ralph
>
>
Author
6 Jul 2005 12:27 PM
Bob Butler
"Ivan Debono" <ivanm***@hotmail.com> wrote in message
news:eoBcQshgFHA.2644@TK2MSFTNGP09.phx.gbl
> This form is modal because I don't want that the user clicks anywhere
> else to close the form, but must click on the Close button.

I don't understand what being Modal has to do with the user not being able
to close the form.

> Due to the time required to prepare records, etc., I need to show
> some sort of progress form.

Why a separate progress form?  Why not a progress bar or other indicator on
the first form?

--
Reply to the group so all can participate
VB.Net: "Fool me once..."
Author
6 Jul 2005 12:30 PM
Larry Serflaten
Show quote Hide quote
"Ivan Debono" <ivanm***@hotmail.com> wrote
> Hi all,
>
> I know that the VB docs say it's not possible, but is there a way (API-wise)
> to display a nonmodal form on a modal form?
>
> This is my problem:
>
> I have a form that performs various day end & month routines including
> searching and preparing records and calling tons of reports. There is no way
> to speed up this because I call stored procedures and it's up to SQL server
> to finish when it feels like.
>
> This form is modal because I don't want that the user clicks anywhere else
> to close the form, but must click on the Close button.
>
> Due to the time required to prepare records, etc., I need to show some sort
> of progress form.
>
> Any ideas to solve this problem?


A.  Can you show progress on the original form?
B.  How about leaving the form modeless and just disabling the controls?

LFS
Author
6 Jul 2005 12:42 PM
J French
On Wed, 6 Jul 2005 13:14:05 +0200, "Ivan Debono"
<ivanm***@hotmail.com> wrote:

Show quoteHide quote
>Hi all,
>
>I know that the VB docs say it's not possible, but is there a way (API-wise)
>to display a nonmodal form on a modal form?
>
>This is my problem:
>
>I have a form that performs various day end & month routines including
>searching and preparing records and calling tons of reports. There is no way
>to speed up this because I call stored procedures and it's up to SQL server
>to finish when it feels like.
>
>This form is modal because I don't want that the user clicks anywhere else
>to close the form, but must click on the Close button.
>
>Due to the time required to prepare records, etc., I need to show some sort
>of progress form.
>
>Any ideas to solve this problem?

Yup - fake the modal form
Author
6 Jul 2005 12:47 PM
Jan Hyde
"Ivan Debono" <ivanm***@hotmail.com>'s wild thoughts were
released on Wed, 6 Jul 2005 13:14:05 +0200 bearing the
following fruit:

Show quoteHide quote
>Hi all,
>
>I know that the VB docs say it's not possible, but is there a way (API-wise)
>to display a nonmodal form on a modal form?
>
>This is my problem:
>
>I have a form that performs various day end & month routines including
>searching and preparing records and calling tons of reports. There is no way
>to speed up this because I call stored procedures and it's up to SQL server
>to finish when it feels like.
>
>This form is modal because I don't want that the user clicks anywhere else
>to close the form, but must click on the Close button.

erm.. so how does a form being modal achieve this?

J

>Due to the time required to prepare records, etc., I need to show some sort
>of progress form.
>
>Any ideas to solve this problem?
>


Jan Hyde (VB MVP)

--
"I'll have to change your grade" Tom's teacher remarked
(Kegel Archives) 

[Abolish the TV Licence - http://www.tvlicensing.biz/]