Board index » delphi » MessageDlg comes up first - strange problem

MessageDlg comes up first - strange problem

I have a strange problem when a user runs my program, but it
doesn't happen for me.  There is a MessageDlg that should come
up only when a certain button is clicked.  It works correctly
for me, but when the user clicks on the shortcut, the MessageDlg
comes up before any thing else.  

It just started doing this 2 days ago when I sent a new version.
I did a rebuild and sent another copy, and it is still doing it
with him, but it never does it with me.  He is running NT 4 and
I'm running 98SE, and I'm using Delphi 5 with the update patch.

What could possibly be causing this strange behavior?

Jud McCranie

 

Re:MessageDlg comes up first - strange problem


In article <3kpmes4ilnaedovjd92ahap1rocit46...@4ax.com>, Jud McCranie

Quote
<jud.mccra...@mindspring.com> writes:
>It just started doing this 2 days ago when I sent a new version.
>I did a rebuild and sent another copy, and it is still doing it
>with him, but it never does it with me.  He is running NT 4 and
>I'm running 98SE, and I'm using Delphi 5 with the update patch.

>What could possibly be causing this strange behavior?

Is it a big program? If it isn't too big I'll try it on my NT4 if you like and
see if the same thing happens.

Let me know

Gordon.
~~~~~~~~~~~~~~~~~~~~~~~~
Try one get one free Equation Illustrator V equation editor
http://www.mgcsoft.com/betas.htm  :))
http://members.aol.com/delphistuf/delphstf.htm   (Delphi bits and bobs and a
few links)

MGCSoft

Re:MessageDlg comes up first - strange problem


Quote
Jud McCranie wrote:
> It just started doing this 2 days ago when I sent a new version.
> I did a rebuild and sent another copy, and it is still doing it
> with him, but it never does it with me.  He is running NT 4 and
> I'm running 98SE, and I'm using Delphi 5 with the update patch.

The reason is: the BringToFront _does_ work under NT, but not anymore
under Win98. It just flashes the applications task bar entry (which IMHO
is regression).
Try the MessageBox function of the WinAPI. You can pass a parameter
telling the dialog to show up on front (or not ;)
Funny thing is: most people wanted to get the same effect under Win98 as
under NT (to bring the message to the front) so IIRC a couple of work
arounds exist there.

Regards,
Udo
--
Please reply to newsgroup. No PMs unless requested.

Re:MessageDlg comes up first - strange problem


Quote
Udo Nesshoever <newsgroup.re...@gmx.net> wrote:
>The reason is: the BringToFront _does_ work under NT, but not anymore
>under Win98. It just flashes the applications task bar entry (which IMHO
>is regression).
>Try the MessageBox function of the WinAPI. You can pass a parameter
>telling the dialog to show up on front (or not ;)
>Funny thing is: most people wanted to get the same effect under Win98 as
>under NT (to bring the message to the front) so IIRC a couple of work
>arounds exist there.

But I have 70 MessageDlgs in the program, and only one comes up
when it shouldn't.

Jud McCranie

Re:MessageDlg comes up first - strange problem


Hi,

I have no real ideas, but try to split the problem down

Take the button out, and see if the dlg still gets created, perhaps some
form of auto crreation is operating ?

If it does not then the button must be getting an onclick from somewhere ?

Try assigning the form creation to another event etc...

Regards

nick

Quote
Jud McCranie <jud.mccra...@mindspring.com> wrote in message

news:3kpmes4ilnaedovjd92ahap1rocit46r6a@4ax.com...
Quote
> I have a strange problem when a user runs my program, but it
> doesn't happen for me.  There is a MessageDlg that should come
> up only when a certain button is clicked.  It works correctly
> for me, but when the user clicks on the shortcut, the MessageDlg
> comes up before any thing else.

> It just started doing this 2 days ago when I sent a new version.
> I did a rebuild and sent another copy, and it is still doing it
> with him, but it never does it with me.  He is running NT 4 and
> I'm running 98SE, and I'm using Delphi 5 with the update patch.

> What could possibly be causing this strange behavior?

> Jud McCranie

Re:MessageDlg comes up first - strange problem


Quote
"Nick Farrow" <Nick.Far...@bt.com> wrote:
>Hi,

>I have no real ideas, but try to split the problem down

I'll try, but it is going to be hard to track down because it
works properly on both of my systems.  It happens with only 1 of
70 MessageDlgs.

Jud McCranie

Re:MessageDlg comes up first - strange problem


OK, I take your point , but create a special button or some way of isolating
the dlg creation

Nick

Quote
Jud McCranie <jud.mccra...@mindspring.com> wrote in message

news:pbkqesganc2n3hg09us2vqoiv89t0vibl4@4ax.com...
Quote
> "Nick Farrow" <Nick.Far...@bt.com> wrote:

> >Hi,

> >I have no real ideas, but try to split the problem down

> I'll try, but it is going to be hard to track down because it
> works properly on both of my systems.  It happens with only 1 of
> 70 MessageDlgs.

> Jud McCranie

Other Threads