* New post Constructor Destructor and Inheritance& Array , Virtual base class in c++ language

Monday, 4 March 2013

0 SCROLL BARS,TIMERS

SCROLL BARS

There are two types of scroll bars controls:

  1. HORIZONTAL
  2. VERTICAL
 Most controls that typically use scrollbars come with them built in ,such as multiline textboxes ,listboxes ,orcombo boxes.We can use the minimum and maxium properties to set the range of values to select and using the scrollbars.

         
                                        SCROLLBARS PROPERTIES

  • LARGE CHANGE= Sets the value added to or subtracted from to the value property when the scroll bars itself is clicked.
  • MAX= The upper limit of the scrollbars range.
  • MIN= The lower limit of the scrollable range.
  • VALUE= Sets a value corresponding to the current position of the scroll box.
                                        SCROLL BARS EVENTS

  • SCROLL= Occurs, when the scroll box is moved.
  • VALUE CHANGED= Occurs ,when the value property has changed ,either by a scroll events.
TIMERS
Timers are also very useful controls ,because they can create peroidic events. They do not appear in a windows at runtime ,At design time , they appear in the component tray under the form we have added them.
TIMERS PROPERTIES 

  • ENABLED= Sets , whether the timer is running.
  • INTERVAL= Sets , the timer (in milisec)between timer tick.
METHOD= There are two method for times such as:

  1. START= start the timer.
  2. STOP= stop the timer.
EVENTS 
  • TICK = Occurs, when the timer is enabled.
                             PROGRAM FOR CREATING THE ALARM CLOCK

Dim blnalarm as boolean= false
private sub timer1_tick (by val sender as system.objects,byval e as system .eventsargs)
label1.text= time of day
If textbox1.text<>""AND textbox2.text<>""AND textbox3.text<>"" then
Dim alarm time = New datetime (today.year,today.month,today.day,(int(textbox1.text,(int(textbox2.text),(int(textbox3.text))
If now>alarmtime and blnalarm then
beep()
end if
end if
end sub
private sub button1 _click(by val sender as system.objects,byval e as system .eventsargs)
timer1.enabled=true
end sub
private sub radiobutton1_click(by val sender as system.objects,byval e as system .eventsargs)
If radiobutton1.checked= true then
blnalarm= true
end sub
private sub radiobutton2_clicked(by val sender as system.objects,byval e as system .eventsargs)
If radiobutton2.checked= false then
blnalarm= false
end sub
end class

0 comments:

Post a Comment

 

PROGRAMMINGqueen Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates

Blogger Widgets