Page loading

Share your opinion
What do you think about gambaslinux.fr?
 
Interesting
It miss some informations
Excellent website
Results
WIDGETS GAMBAS
GAMBAS 3 SOFTWARES
TUTORIALS
Library
LABEL - Led warning
LED WARNING WITH LABEL


changercouleur.png

Hye,
Today we learn to warn a LED with a label widget. It's will be pleasant in your future GAMBAS application.
Create a label with both properties :
BORDER = RAISED and
 BACKGROUD = &H000000&
Create 2 buttons bon and boff to switch on and switch off the led. A timer is necessary to warn.
It is possible to add a slider to tune speed of warning.
Now ,here you find bellow the source code of my example :

' Gambas class file

PUBLIC SUB _new()
END

PUBLIC SUB Form_Open()
ME.Center 'center the windows
END

PUBLIC SUB Timer1_Timer() 'Warn function (our timer)
SELECT CASE lled.Background
CASE &h000000&
lled.Background = &h00FF00&
CASE &h00FF00&
lled.Background = &h000000&
END SELECT
END

PUBLIC SUB bon_Click() 'Start warning
Timer1.Enabled = TRUE
END

PUBLIC SUB boff_Click() 'stop warning
Timer1.Enabled = FALSE
END

PUBLIC SUB Slider1_Change()'Ajust/Tune speed warning
Timer1.Delay = Slider1.Value
END

the end tongue


Creation date : 18/05/2010 @ 11:02
Last update : 18/05/2010 @ 11:12
Category : LABEL
Page read 5449 times


Print the article Print the article


react.gifReactions to this article

Nobody gave a comment yet.
Be the first one to do it!


QUICK MENU
SEARCH




LANGUAGE
COMPONENTS
Other
LANGUAGE
Where, who?
VISITS

   visitors

   visitors online

ARCHIVES GAMBAS 1/2
^ Top ^