Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Flashing minimized title bar
Message
From
15/01/2007 12:58:28
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
15/01/2007 12:50:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01185656
Message ID:
01185660
Views:
25
This message has been marked as the solution to the initial question of the thread.
>This procedure is supposed to flash the minimised title bar. at least that is my intention. I have it in the timer event.
>
>firstly i dont know if this is the ideal approach,
>secondly the line _screen.icon=.... just makes my computer slow down to such an extent that i cannot even stop the process from the taskbar.
>
>what am i doing wrong, what is a better approach?
>
>Lcnts=.t.
>
>do whil Lcnts
>
> Ltm=right(time(),2)
> Ltmv=val(Ltm)
> if int(Ltmv/2)=(Ltmv/2)
> _screen.caption=''
> _screen.icon='\picture\disk06.ico'
> else
> _screen.caption='Something Else Here'
> _screen.icon=''
> endif
>
> Lws=_screen.windowstate
>
> if Lws=2
> Lcnts=.f.
> endif
>
>enddo
#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
Next
Reply
Map
View

Click here to load this message in the networking platform