Share your opinion
WIDGETS GAMBAS
GAMBAS 3 SOFTWARES
TUTORIALS
Library
|
LABEL - Led warning
LED WARNING WITH LABEL
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 Creation date : 18/05/2010 @ 11:02 Reactions to this article
| QUICK MENU
SEARCH
LANGUAGE
COMPONENTS
Other
LANGUAGE
Where, who?
VISITS
visitors visitors online ARCHIVES GAMBAS 1/2
|