SET TALK OFF SET SAFETY OFF CLOSE TABLES CREATE TABLE testflas (cid c(10), ddate D) FOR i = 1 TO 500 APPEND BLANK REPLACE testflas.cid WITH ALLTRIM(STR(i)) REPLACE testflas.ddate WITH DATE() - i ENDFOR GO TOP llend = .F. oform = CREATEOBJECT('TESTFLASH') oform.show() DO WHILE !llend read events ENDDO IF TYPE('oform')="O" .and. !ISNULL(oform) oform.release ENDIF RELEASE oform CLOSE tables RETURN PROCEDURE decl DECLARE Sleep IN kernel32 INTEGER dwMilliseconds DECLARE INTEGER GetActiveWindow IN user32 DECLARE INTEGER FlashWindow IN user32; INTEGER hWnd, INTEGER bInvert DEFINE CLASS testflash AS FORM caption = 'TESTFLASH' Height = 160 Width = 325 DoCreate = .T. WindowState = 0 Name = "TESTFLASH" lstop = .F. ADD OBJECT timer1 AS timer WITH ; Top = 0, ; Left = 12, ; Height = 23, ; Width = 23, ; Interval = 50, ; Name = "Timer1" ADD OBJECT cmdgo AS commandbutton WITH ; Top = 108, ; Left = 120, ; Height = 27, ; Width = 84, ; Caption = "Start", ; Name = "cmdGo" ADD OBJECT label1 AS label WITH ; BackStyle = 0, ; Caption = "", ; Height = 17, ; Left = 36, ; Top = 60, ; Width = 132, ; Name = "Label1" ADD OBJECT label3 AS label WITH ; BackStyle = 0, ; Caption = "ID", ; Height = 17, ; Left = 36, ; Top = 36, ; Width = 40, ; Name = "Label3" ADD OBJECT label4 AS label WITH ; BackStyle = 0, ; Caption = "Date", ; Height = 17, ; Left = 180, ; Top = 36, ; Width = 40, ; Name = "Label4" ADD OBJECT label2 AS label WITH ; BackStyle = 0, ; Caption = "", ; Height = 17, ; Left = 180, ; Top = 60, ; Width = 132, ; Name = "Label2" PROCEDURE Unload DODEFAULT() llend = .T. CLEAR EVENTS RETURN ENDPROC PROCEDURE timer1.Timer IF _screen.windowstate = 1 && minimized IF testflas.ddate < DATE() - 15 THISFORM.lstop = .T. ENDIF ENDIF RETURN ENDPROC PROCEDURE cmdgo.Click MESSAGEBOX('VFP will minimize and then in approximately 15 seconds VFP will'+CHR(13); +'start flashing on the startmenu. Press escape or click on it to'+CHR(13); +'bring it open on the screen.',0) DO DECL LOCAL hWindow hWindow = GetActiveWindow() _screen.windowstate = 1 GO TOP SCAN THISFORM.label1.caption=testflas.cid thisform.label2.caption=DTOC(testflas.ddate) WAIT WINDOW "Processing: "+testflas.cid TIMEOUT 1 IF THISFORM.lstop = .T. DO WHILE _screen.windowstate = 1 = FlashWindow (hWindow, 1) = Sleep (250) = FlashWindow (hWindow, 0) = Sleep (100) ENDDO MESSAGEBOX('Verify that the date for this record is 15 days old!',0) EXIT ENDIF ENDSCAN GO TOP RETURN ENDPROC ENDDEFINE