Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Set Time From Server Menu


the_best_flash
 Share

Recommended Posts

Set Time from the Server Menu…

This is my first attempt at programming the Eclipse engine and I just decided to post it here... This is very simple and will make your Server Menu look like this...

[![](http://img3.freeimagehosting.net/uploads/6142e0649b.png)](http://www.freeimagehosting.net/)

If you haven't changed the server menu, just download the attached form layout and replace the one in your folder… (This is the menu for Baron's EE 1.0 you will need to follow the below directions for any other version of EE)

Otherwise change the Server Menu so that it looks like the one in this picture:

[![](http://img3.freeimagehosting.net/uploads/be485cb21d.png)](http://www.freeimagehosting.net/)

Do this by adding

3 Text Boxes
2 Labels between the boxes
1 Button

Then modify the text boxes like this:

  First box:
  [![](http://img3.freeimagehosting.net/uploads/1861dc163a.png)](http://www.freeimagehosting.net/)

Second Box:
[![](http://img3.freeimagehosting.net/uploads/1b90b7eecf.png)](http://www.freeimagehosting.net/)

  Third Box:
[![](http://img3.freeimagehosting.net/uploads/fb25feb0c3.png)](http://www.freeimagehosting.net/)

Labels should go in between the first & second and the second & third boxes.

Set up the button like this:

[![](http://img3.freeimagehosting.net/uploads/2fae8d035d.png)](http://www.freeimagehosting.net/)

After this double click on the button or find the sub that runs when the button is clicked and paste this code into it:

```
Dim doset As Boolean
doset = True
If IsNumeric(SetHour.text) = False Then
    MsgBox "Enter a numerical value!"
    SetHour.text = 1
    doset = False
End If
If SetHour.text > 24 Then
    MsgBox "Enter an hour of less than 25"
    SetHour.text = 24
    doset = False
End If
If SetHour.text <= 0 Then
    MsgBox "Enter an hour of greater than than 0"
    SetHour.text = 1
    doset = False
End If
If IsNumeric(SetMin.text) = False Then
    MsgBox "Enter a numerical value!"
    SetMin.text = 0
    doset = False
End If
If SetMin.text > 59 Then
    MsgBox "Enter a minute of less than 60"
    SetMin.text = 59
    doset = False
End If
If SetMin.text < 0 Then
    MsgBox "Enter a minute of 0 or more"
    SetMin.text = 0
    doset = False
End If
If IsNumeric(SetSec.text) = False Then
    MsgBox "Enter a numerical value!"
    SetSec.text = 0
    doset = False
End If
If SetSec.text > 59 Then
    MsgBox "Enter a second of less than 60"
    SetSec.text = 59
    doset = False
End If
If SetSec.text < 0 Then
    MsgBox "Enter a second of 0 or more"
    SetSec.text = 0
    doset = False
End If
If doset = True Then
  Hours = SetHour.text 'Set Hours
  Minutes = SetMin.text 'Set Minutes
  Seconds = SetSec.text 'Set Seconds
End If
```
And after this add the following to the 'Private Sub Form_Load()':
```
SetHour.text = 1
SetMin.text = 0
SetSec.text = 0
```
After this just compile the code and you will be able to set your time from the server menu…
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...