FB II Compiler

PG PRO

Debugging

Memory

System

Mathematics

Resources

Disk I/O

Windows

Controls

Menus

Mouse

Keyboard

Text

Fonts

Drawing

Sound

Clipboard

Printing

Communication

ASM

Made with FB

FB II COMPILER

Handle the Suspend/Resume events



Check the SIZE resource has the flag set for Suspend / Resume events otherwise your application willnever receive the event.

Deep


I think the FB doc's are incorrect regarding _mfResume and _mfClipboard. This is how it works on _my_ machine at least:

* _mfResume means your app has been brought to the front and the clipboard was _not_ changed while your app was in back;

* _mfClipboard means your app has been brought to the front and the clipboard _was_ changed while your app was in back.

In other words, when my app is brought to the front, I get either _mfResume or _mfClipboard, but never both. I have to check for both of them. Try changing your SELECT statement to this:

CASE _MFEvent
  SELECT id%
    CASE _mfSuspend
      WINDOW -_fullScreen 'hide it
    CASE _mfResume, _mfClipboard
      WINDOW _fullScreen 'show it
    CASE _mfMouse
      CURSOR _arrowCursor
  END SELECT

To me the doc's are fuzzy about this, but my best guess about what they're saying is this:

* If another app has changed the clipboard while your app is in back, then when your app is next brought to the front you'll get both an _mfResume event and an _mfClipboard event.

* If the clipboard did _not_ change while your app was in back, then when your app is brought to the front you'll get an _mfResume event, but no _mfClipboard event.

Rick


That is correct. The system sets two bits which are interpreted exactly as you have outlined them. This is a standard and has not changed in about a decade.

STAZ ~)~