In this tutorial you will find out how to
1. Use a timer
2. use a Frame
3. Use LOCKED text boxxes
4. Enabling items from Form_Load
start off by making a new standard exe project.
then select the form and set its properties to this
name - frmClock
caption - Clock
BorderStyle - 1 Fixed Single
height - 1365
width - 3345
lets start off by making the timer, double click the clock icon in the tool bar to add it and set its properties to
name - TR1
enabled - False
interval - 200
left - 1320
top - 240
now add a frame (the one under the BIG A if on the left and its going down.)
set that frames properties to the following
name - frmTime
caption - Time/Date
height - 855
width - 3255
left - 0
top - 0
and now were going to add two text boxes within the frame, select the text box option from the tool bar, and drag it within the frame (this is if you ever wanted to move the thing to another spot u didnt hafta drag item by item)
and set that text box properties to
name - txtTime
text - Time
left - 120
top - 240
height - 375
width - 1335
and do the same thing only set the new ones properties to
name - txtDate
text - Date
left - 1800
top - 240
height - 375
width - 1335
now that we got all of the text boxes, timers, and the frame in, lets set up the code.
First double click the caption of the frm to load up the Form_Load code area, and put this in it
and then go to the Timers code by double clicking it and addCode:TR1.enabled = True
simple! yet effectiveCode:txtDate.text = Date txtTime.text = Time
you can change the color of the text by changing the foreground and the background properties.


LinkBack URL
About LinkBacks




Reply With Quote