TimStone wrote:Silvio,
First, I see lots of applications with those warning icons, but never flashing. I think to do that you would have to create a function that displays, removes, displays, removes the icon. That would certainly be a load on the CPU to constantly refresh the dialog to display it in a flash.
Icons, by nature, are not ( I think ) animated. Just thinking outloud, but can you insert a GIF for a flashing warning ? I really don't know if you can do it, but just sharing some thoughts.
Tim
Tim,
I resolved!!!!
Two Bitmaps
warning1.bmp
warning2.bmp
If you save from forum you must rename the exstension of Bmps because postimages.org converte on Png
Code: Select all | Expand
// Animations on MsgItem using Bmp and Timers
#include "FiveWin.ch"
static oWnd
//----------------------------------------------------------------------------//
function Main()
local oBrush
DEFINE WINDOW oWnd FROM 1, 1 TO 20, 60 ;
TITLE "msgitem"
SET MESSAGE OF oWnd ;
TO FWVERSION + FWCOPYRIGHT
DEFINE MSGITEM oMsgItem1;
OF oWnd:oMsgBar ;
SIZE 170 ;
ACTION NIL
ACTIVATE WINDOW oWnd ;
ON INIT DisplayIcons(oMsgItem1)
return nil
//----------------------------------------------------------------------------//
function DisplayIcons(oMsgItem1)
local oIco, oTimer
static nFrame := 1
oMsgItem1:cMsg:="Archivio non aggiornato"
DEFINE TIMER oTimer OF oWnd ;
INTERVAL 400 ;
ACTION ( nFrame := If( ++nFrame > 2, 1, nFrame ) , ;
oMsgItem1:setBitmap( "warning" + AllTrim( Str( int(nFrame) ) )+".bmp" ) )
ACTIVATE TIMER oTimer
return nil
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com