Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Flash application on the taskbar
Message
From
07/12/2006 07:41:15
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Pro
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01175541
Message ID:
01175548
Views:
7
>hi all,
>i have a customer who need to have an inactive application flash on the task bar if something happens. basically the VFP application has a timer that runs every 3 minutes and if there is a file there it imports it. the user may be in another application and if this is the case they want to application on the taskbar to flash to call attention to it.
>~M
#Define FLASHW_STOP 0
#Define FLASHW_CAPTION 1
#Define FLASHW_TRAY 2
#Define FLASHW_ALL FLASHW_CAPTION + FLASHW_TRAY
#Define FLASHW_TIMER 4
#Define FLASHW_TIMERNOFG 12



_Screen.WindowState = 1

INKEY(5) && wait for 5 seconds before flashing

Declare short FlashWindowEx In Win32API String @pfwi
Declare Integer MessageBeep In Win32API Integer
Set Library To Home()+"foxtools.fll" Additive
FoxWnd = MainHwnd()

* Flash 5 times - 4th parameter
pwfi = ;
  N2S(20,4)+;
  N2S(m.FoxWnd,4)+;
  N2S(FLASHW_TRAY+FLASHW_TIMERNOFG,4)+;
  N2S(5,4)+;
  N2S(0,4)

MessageBeep(0x2)
FlashWindowEx(pwfi)

Function N2S
  Lparameters tnValue, tnSize
  Local lcStr, ix
  lcStr = ""
  For ix=1  To m.tnSize
    lcStr = m.lcStr + Chr(m.tnValue % 256)
    tnValue = Int(m.tnValue/256)
  Endfor
  Return m.lcStr
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform