Paradox Community

Items in comp.databases.paradox

Subject:Re: Permitting a form to close
Date:Sat, 11 Mar 2017 00:44:31 +1000
From:"Leslie" <ViaThe List@NOSPAM.com>
Newsgroups:comp.databases.paradox
"Kevin Baker" <shcsbaker@gmail.com> wrote in message 
news:58c28552$1@pnews.thedbcommunity.com...

> When the user clicks FormB, the NavBar "knows" that FormA is open and will 
> close it, then open FormB.  One problem I've come across is if the user 
> closes FormA by clicking the "X" and then clicks FormA again on the 
> NavBar, they NavBar will

Apart from clicking on the Navbar to open another form, is there another 
button on FormA that closes it. If so, then trap the WM_CLOSE message and do 
the same processing.

If not, then my expectation is that when FormA closes it sends a message to 
the NavBar telling it that it has closed. If Paradox is simply forwarding 
Windows messages then you can use WinSpy to check what message is being 
sent.

If you make form A B C etc modeless child Windows of NavBar then I would 
check the WM_PARENTNOTIFY message or if not just the WM_NOTIFY.

If FormA is not a child of NavBar then something else is its parent. That 
Parent can look for the Close notification and then tell Navbar what has 
occurred.


> do nothing since it "thinks" that FormA is already open.

I guess this means that NavBar retains the Window Handle of FormA and so if 
the Window Handle != NULLHDL then it is presumed to be open. So all you 
would need to do is reset that handle somehow and then Navbar will reopen 
FormA as it should.


> I may need to just chew on this a bit more, but I don't think killing the 
> close button is the solution.

No it is not. Perhaps someone else can jump in here as it has been two 
decades since I did anything with OPAL but something tells me that you 
should be able to intercept the WM_ messages which means all you have got to 
do is find the right one. Like I said try WinSpy.

Leslie.



Copyright © 2004 thedbcommunity.com