Posted By

jimmykobe48 on 11/10/10


Tagged


Versions (?)

Sub Procedure


 / Published in: Visual Basic
 

  1. Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
  2. 'Calculates the time for the different time zones.
  3.  
  4. lblIsraelTime.Text = dtpYourTime.Value.AddHours(6).ToString("T")
  5. lblRussiaTime.Text = dtpYourTime.Value.AddHours(8).ToString("T")
  6. lblSouthKoreaTime.Text = dtpYourTime.Value.AddHours(13).ToString("T")
  7. lblisraelDate.Text = dtpYourTime.Value.AddHours(6).ToString("D")
  8. lblRussiaDate.Text = dtpYourTime.Value.AddHours(8).ToString("D")
  9. lblSouthKoreaDate.Text = dtpYourTime.Value.AddHours(13).ToString("D")
  10. End Sub
  11.  
  12. Private Sub btnReset_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReset.Click
  13. 'Reset the labels to their defult value.
  14.  
  15. lblIsraelTime.Text = "Hour:Minute (AM or PM)"
  16. lblRussiaTime.Text = "Hour:Minute (AM or PM)"
  17. lblSouthKoreaTime.Text = "Hour:Minute (AM or PM)"
  18. lblisraelDate.Text = "Date"
  19. lblRussiaDate.Text = "Date"
  20. lblSouthKoreaDate.Text = "Date"
  21. dtpYourTime.Focus()
  22.  
  23.  
  24. End Sub

Report this snippet  

You need to login to post a comment.