Announcement

Collapse
No announcement yet.

Detecting msgbox in Background

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Detecting msgbox in Background

    Hi

    I like to detect the precense of a msgbox (possibly flashing) visualy behind my active application.

    The situation:
    My foreground application is touchscreen and without keyboard.
    The app covers the whole screenarea so no taskbar is not visible.

    As I send printjobs in the background, possible printer related errors are poping up behind my application.

    Now I need to detect if these error's are present.

    Has someone solved this situation before?

    Any help greatly welcom

    Thanks

    Eric Kelderman


    ------------------
    Eric Kelderman
    www.dlog.nl

  • #2
    there's probably a few ways to do it, but one way might be to set a timer that calls FindWindow()

    DIM hFound&
    hFound& = FindWindow("", "Finished printing") '<- window caption

    hFound will hold the handle to the window, or 0 if it failed/couldnt find the window

    ------------------
    -

    Comment


    • #3
      Eric --
      1) Try to use %WS_EX_TOPMOST style for your dialog.
      2) Also you can (by timer) detect, which window is located for example, in the center of the screen.
      Look WindowFromPoint + GetWindowThreadProcessId vs GetCurrentThreadId.


      ------------------
      E-MAIL: [email protected]

      Comment

      Working...
      X