Calculation in visual basic....

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to build a program for the first time in Visual Basic. I work
for a public utility and we will use to track our crews during large outages.
It is a simple program with 16 lines of text boxes and a check box. I also
have the current time listed using the timer function. I would like for the
program to do three things:

1) Time stamp a time text box when text is edited or the check box is
checked.
2) Change the font on the entire line when the check box is checked.
3) Set of some kind of alarm (i.e. flashing font or sound) when a check box
has been checked for more than five minutes.

I am fairly new at this so any help would be appreciated.
Thanks,
Dustin
 
Everything you're trying to do is around events that are attached to
controls. Presuming you are using Visual Studio (2003/5), if you click on a
control (say a check box), then click on the little lightning bolt, this
gives you a list of events that are fired when that action takes place.
Double click on the event you want and it automatically creates a blank
function for you to populate.
For 1), simply reference the value found in DateTime.Now and store it
somewhere
for 2), you'll need a reichtextbox control to change the font, or you can
change the background colour of a textbox to highlight it
and for 3), you need to set up a timer control for each textbox/checkbox
combination that you enable when the checkbox is checked and that goes off
every x seconds and checks if the check box was ticked 5 minutes ago (since
you have the time it was checked from 1).

google "vb.net events" and "vb.net timer" and you'll find tonnes of stuff.
good luck.
Dan.
 
Back
Top