I wanted to use the function < WaitSeconds( 0.3 ) >
( internal used in FWH - Wait-functions )
to change on click 0.3 seconds to a new color of a bitmap.
After the time, i want to show the old color again.
- Code: Select all Expand view
REDEFINE BITMAP oBmp4 ID 210 ADJUST RESOURCE "Blanc" OF oDlg
oBmp4:bMMoved := { || cursorhand() }
// On click, i want to change the color of the bitmap for about 0.3 seconds
// and after i want to show the old color again. ( button-click-effect )
oBmp4:bLClicked := {|| oBMP4:bPainted := ;
{ |hDC|OnPaintV( hDC,oBMP4, 128,15779475,0, ;
"Vertical Button", oBfont1, 0 ,"TEST.BMP" ,4 ), oBmp4:Refresh(), ;
WaitSeconds( 0.3 ) }, ;
oBMP4:bPainted := { |hDC|OnPaintV( hDC,oBMP4, ;
13003573,15779475,0, "Vertical Button", oBfont1, 0 ,"TEST.BMP" ,4 ) }, ;
oBmp4:Refresh(), DIALOG_1() }
// The original start-color
oBMP4:bPainted := { |hDC|OnPaintV( hDC,oBMP4, ;
13003573,15779475,0, "Vertical Button", oBfont1, 0 ,"TEST.BMP" ,4 ) }
// ---------------------------
FUNCTION DIALOG_1()
MsgAlert( "I am Your Function 1" )
RETURN( NIL )
The 1. oBmp4:Refresh() doesn't show a new color ( 128 = Red on Blue )
Waitseconds works, but only the 2. color is shown.
Is there something wrong with the use of < Waitseconds > ?
If i do a click on the bitmap, following happens :
1. WaitSeconds( 0.3 ) starts
2. the MsgAlert( "I am Your Function 1" ) is shown
3. The 2. Color is shown AFTER !!! the Alert.
I need it this way :
1. The 1. Color is shown ( new color )
2. WaitSeconds( 0.3 )
3. The 2. Color is shown ( old color )
4. The Alert ( function starts )
Regards
Uwe