Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

MessageBoxes and Modal State

4 posts in Objects Last posting was on 2004-06-09 18:05:44.0Z
Victor George Posted on 2004-06-04 19:41:55.0Z
From: "Victor George" <victorisguapo@hotmail.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: MessageBoxes and Modal State
Lines: 12
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
X-Original-NNTP-Posting-Host: 12.151.152.4
Message-ID: <40c0d0ca$1@forums-2-dub>
X-Original-Trace: 4 Jun 2004 12:43:06 -0700, 12.151.152.4
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 4 Jun 2004 12:39:50 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 4 Jun 2004 12:41:55 -0700
X-Trace: forums-1-dub 1086378115 10.22.108.75 (4 Jun 2004 12:41:55 -0700)
X-Original-Trace: 4 Jun 2004 12:41:55 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7919
Article PK: 735197

Does anybody have a handle on PowerBuilder MessageBoxes?

We are trying to find a way to detect in code if a MessageBox 'object' is
open.

Similar to GetActiveSheet or IsValid works for windows.

OR, if you have a way to detect that the app is in a modal state.

Thanks


Steve Katz [TeamSybase] Posted on 2004-06-07 14:57:18.0Z
Sender: 6169.40bc842f.1804289383@sybase.com
From: Steve Katz [TeamSybase]
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: MessageBoxes and Modal State
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <40c482a1.4da.1681692777@sybase.com>
References: <40c0d0ca$1@forums-2-dub>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 7 Jun 2004 07:58:41 -0700, 10.22.241.42
Lines: 29
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 7 Jun 2004 07:54:58 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 7 Jun 2004 07:57:18 -0700
X-Trace: forums-1-dub 1086620238 10.22.108.75 (7 Jun 2004 07:57:18 -0700)
X-Original-Trace: 7 Jun 2004 07:57:18 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7921
Article PK: 735191

What is it you're trying to accomplish?

If it's something like automatically closing the MB after x
number of seconds of idle time, you would have to build your
own message box using a response type window. In the open
event, for example, you can call Timer (x) and then put your
logic in the timer event on the response window. There is
no idle event on a response window, however, so take this
into account.

Also, if you call MessageBox() directly, all bets on this
are off.

steve
[TeamSybase]

> Does anybody have a handle on PowerBuilder MessageBoxes?
>
> We are trying to find a way to detect in code if a
> MessageBox 'object' is open.
>
> Similar to GetActiveSheet or IsValid works for windows.
>
> OR, if you have a way to detect that the app is in a modal
> state.
>
> Thanks
>
>


Paul Horan[TeamSybase] Posted on 2004-06-07 13:21:41.0Z
From: "Paul Horan[TeamSybase]" <paulhATvcisolutionsDOTcom>
Newsgroups: sybase.public.powerbuilder.objects
References: <40c0d0ca$1@forums-2-dub>
Subject: Re: MessageBoxes and Modal State
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
X-Original-NNTP-Posting-Host: 67-23-177-27.bflony.adelphia.net
Message-ID: <40c46c38$1@forums-2-dub>
X-Original-Trace: 7 Jun 2004 06:23:04 -0700, 67-23-177-27.bflony.adelphia.net
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 7 Jun 2004 06:19:21 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 7 Jun 2004 06:21:41 -0700
X-Trace: forums-1-dub 1086614501 10.22.108.75 (7 Jun 2004 06:21:41 -0700)
X-Original-Trace: 7 Jun 2004 06:21:41 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7920
Article PK: 735192

If a Messagebox object is open, your application is halted and waiting for an answer. Since it's single-threaded (by
default - there is a way to make a PB app multi-threaded), there's no way that any "other" code can be running to detect
that state.

Are you trying to do this from a separate application? If so, then you can use the FindWindowA() API call.

--
Paul Horan[TeamSybase]

"Victor George" <victorisguapo@hotmail.com> wrote in message news:40c0d0ca$1@forums-2-dub...
> Does anybody have a handle on PowerBuilder MessageBoxes?
>
> We are trying to find a way to detect in code if a MessageBox 'object' is
> open.
>
> Similar to GetActiveSheet or IsValid works for windows.
>
> OR, if you have a way to detect that the app is in a modal state.
>
> Thanks
>
>


Songyote Mungmai Posted on 2004-06-09 18:05:44.0Z
Reply-To: "Songyote Mungmai" <songyote.m@bfkt.co.th>
From: "Songyote Mungmai" <songyote.m@bfkt.co.th>
Newsgroups: sybase.public.powerbuilder.objects
References: <40c0d0ca$1@forums-2-dub>
Subject: Re: MessageBoxes and Modal State
Lines: 25
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2739.300
X-Original-NNTP-Posting-Host: 202.3.68.121
Message-ID: <40c751d1@forums-2-dub>
X-Original-Trace: 9 Jun 2004 11:07:13 -0700, 202.3.68.121
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 9 Jun 2004 11:03:09 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 9 Jun 2004 11:05:44 -0700
X-Trace: forums-1-dub 1086804344 10.22.108.75 (9 Jun 2004 11:05:44 -0700)
X-Original-Trace: 9 Jun 2004 11:05:44 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7933
Article PK: 735206

--
Songyote Mungmai
Master Computer SCI.
Chula University.
Mobile : 06-3510044
Office : 02-2889479

"Victor George" <victorisguapo@hotmail.com> wrote in message
news:40c0d0ca$1@forums-2-dub...
> Does anybody have a handle on PowerBuilder MessageBoxes?
>
> We are trying to find a way to detect in code if a MessageBox 'object' is
> open.
>
> Similar to GetActiveSheet or IsValid works for windows.
>
> OR, if you have a way to detect that the app is in a modal state.
>
> Thanks
>
>