Author Topic: Ways to notify user when window minimized or not in focus  (Read 3048 times)

0 Members and 1 Guest are viewing this topic.

Offline Richard Frost

  • Seasoned Forum Regular
  • Posts: 316
  • Needle nardle noo. - Peter Sellers
    • View Profile
Ways to notify user when window minimized or not in focus
« on: January 29, 2020, 12:26:18 am »
I wanted to use the new features of 1.4 to blink status lights for my chess program, to tell me
when it's my move even when I have another window obscuring the chess window.  However, my O/S
also blinks a little box on screen every time the status of those keys (caps lock, num lock, and
scroll lock) changes, which is annoying.  And I can't find how to turn that notification off with XP.

So I found another, entirely different way.  I blink the icon!  MS Paint will reverse the colors
of an icon.  So I toggle between them with:

blink = blink XOR 1
f$ = "icon" + CHR$(48 + blink) + ".png"
i& = _LOADIMAGE(f$): _ICON i&: _FREEIMAGE i&

All the Windows performance monitors change the icon to reflect CPU load - must be several pictures
or icon files for that, or maybe they're created on the fly.  QB64 could do that too.

The power and versatility of QB64 continues to amaze me. 
It works better if you plug it in.

FellippeHeitor

  • Guest
Re: Ways to notify user when window minimized or not in focus
« Reply #1 on: January 29, 2020, 08:03:21 am »
You may want to customize it even further:

Code: QB64: [Select]
  1.     'Do something
  2.     'Do something else

Offline doppler

  • Forum Regular
  • Posts: 241
    • View Profile
Re: Ways to notify user when window minimized or not in focus
« Reply #2 on: January 29, 2020, 08:20:18 am »
The power and versatility of QB64 continues to amaze me.

Tighten your seat belt 2020 is going to be a bumpy ride.