Hi Friends,
I have an MDI app. In one of MDI sheets, I have a dw object and a tab object. Both objects have code for the rbuttonup event that pops up a different menu depending on which object or tab is clicked.
When the user has the app running and this window/sheet is open, then changes the focus to another app, say Calculator, then right-clicks on the dw in my app (with Calculator still in the front), they get the spinning pointer style (busy) then my app always just closes without any message or warning. If the user does the same thing, but right-clicks on the tab-object, my app regains focus, comes to the front (over Calculator) and processes the right-click event correctly. (This is what the app should do.) It's just when the user right-clicks on the dw object in the mdi sheet that this happens. (Turns out, if the user left-clicks on the dw object from Calculator, my app still doesn't regain focus... sometimes my app crashes, sometimes it doesn't.) It does the same thing in both the development environment and runtime.
It's not related to Calculator... does the same thing with notepad, Outlook, or any other outside app. Is there some event I need to process first to force my app to get focus and come to the front? Right now, my solution is to tell the customer "Don't do that", lol!
Here's the relavent rbutton up code:
if this.RowCount() < 1 then return
m_bt_folder lm_popup
lm_popup = CREATE m_bt_folder
lm_popup.of_SetParent( this )
lm_popup.m_lab.m_instrument.PopMenu(PointerX(), PointerY() )
Using PB2021 Build 1509, PFC 12.5
TIA,
~~~Tracy